编写Markdown时,一般换行不是问题:
This is a very long sentence in a short
paragraph, or maybe a paragraph made of
a single very long sentence.
This is an intended separate paragraph.
应该与
相同This is a very long sentence in a short paragraph, or maybe a paragraph made of a single very long sentence.
This is an intended separate paragraph.
但在使用列表时显然不是:
Here is some text:
- Short title:
- This is a very long sentence in a short
paragraph, perhaps.
与
不一样Here is some text:
- Short title:
- This is a very long sentence in a short paragraph, perhaps.
换行符会导致其嵌入到列表项中。 我想继续在 Markdown 源代码中使用换行符以提高可读性(最大行长度 120),而不会影响其渲染时的外观(例如,在 GitHub 上或渲染为 PDF)。是否可以?如果没有,是否有更好的方法,在没有整个标题的情况下先有一个简短的标题,然后是一个较长的解释?
我无法重现您遇到的问题:
这个
Here is some text:
- Short title:
- This is a very long sentence in a short
paragraph, perhaps.
还有这个
Here is some text:
- Short title:
- This is a very long sentence in a short paragraph, perhaps.
产生与
相同的结果这是一些文字:
我认为您可能在
- This is a very long sentence in a short
的末尾有一些额外的空格,因为行尾的两个空格会被渲染为换行符。