我可以在兼容GitHub的Markdown中对长列进行单词换行吗? [英] Can I word-wrap long columns in GitHub-compatible Markdown?

查看:136
本文介绍了我可以在兼容GitHub的Markdown中对长列进行单词换行吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个GitHub问题/维基页面,其中包含一个表格,其中一列对于许多条目来说非常大。有什么办法可以在兼容GitHub的Markdown的表格中包装长列?



示例:



常规列|长列|



| -------------- | ----------- |



|少量|非常多的东西,它使我必须滚动,这对于快速阅读是非常不利的。 | b

我想这样做是为了让长列的内容自动包装,这样人们可以浏览内容而无需滚动到右侧以查看所有内容。

解决方案

这不是降价功能,因为降价不会导致呈现视图。渲染降价的应用程序是负责间距的应用程序。例如,我在GH回购中使用了您的确切文件,它看起来不错:



然后我添加了更多的文字以查看它是否变得丑陋。它仍然看起来不错:



p>

GitHub呈现网站的方式让它变得非常漂亮。无论您正在查看哪种应用程序,都需要实现类似的功能,可能看起来像这个CSS

  div {
width:200px;
word-wrap:分词;
}


I am writing a GitHub issue/wiki page which contains a table where one of the columns is quite large for many of the entries. Is there any way to wrap long columns in a table in GitHub-compatible markdown?

Example:

| Regular Column | Long Column |

| -------------- | ----------- |

| Small amount | So much stuff that it makes it so that I have to scroll which is really bad for quick readability. |

I would like to make it so that the content of "Long Column" is automatically wrapped so that people can skim the contents without having to scroll way over to the right to see all of the contents.

解决方案

It's not a markdown feature since markdown doesn't result in a rendered view. The app that's rendering your markdown is what's in charge of spacing. For example, I used your exact file in a GH repo and it looks good:

I then added even more text to see if it gets ugly. It still looks good:

The way GitHub renders the site makes it pretty. Whatever app you're viewing it in needs to implement something similar, that may look like this CSS:

div {
    width: 200px;
    word-wrap: break-word;
}

这篇关于我可以在兼容GitHub的Markdown中对长列进行单词换行吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆