在md中进行第一次转换后,防止额外换行

时间:2017-03-22 13:44:53

标签: markdown pandoc restructuredtext github-flavored-markdown

我有一些我要转换为reStructuredText文件的markdown文件。我刚开始使用Pandoc来满足这个特殊要求。到目前为止,我使用以下简单命令

> pandoc --from markdown --to rst --columns 80 --output foo.rst foo.md

现在在我的降价时,我已经列出了文字,以便标题后面没有新行,例如:

# Some heading
Some text that follows on the line immediately after the heading

上述命令的结果虽然插入了一个额外的新行:

Some heading
============

Some text that follows after the heading *and* a new-line

如果我认为这个添加的新行不是reStructuredText的要求,是否有正确的方法可以防止Pandoc插入它?

1 个答案:

答案 0 :(得分:0)

正如@Waylan评论的那样,在标题后面添加一个新行被认为是降价的最佳实践方式,因此Pandoc的插入是正确的。

相关问题