在进入 md 到 rst 转换后防止额外的换行符
Prevent extra newline after heading in md to rst conversion
我有一些 markdown 文件要转换为 reStructuredText 文件。我刚刚开始使用 Pandoc 来满足这个特殊要求。到目前为止,我正在使用以下简单命令
> pandoc --from markdown --to rst --columns 80 --output foo.rst foo.md
现在在我的 markdown 中,我对文本进行了布局,这样标题后就没有新行了,例如:
# Some heading
Some text that follows on the line immediately after the heading
尽管上述命令的结果插入了一个额外的 new-line:
Some heading
============
Some text that follows after the heading *and* a new-line
如果我认为添加的 new-line 不是 reStructuredText 的要求是正确的,是否有一些简单的方法可以防止 Pandoc 插入它?
正如@Waylan 评论的那样,在标题后换行被认为是降价的最佳实践风格,因此 Pandoc 插入它们是正确的。
我有一些 markdown 文件要转换为 reStructuredText 文件。我刚刚开始使用 Pandoc 来满足这个特殊要求。到目前为止,我正在使用以下简单命令
> pandoc --from markdown --to rst --columns 80 --output foo.rst foo.md
现在在我的 markdown 中,我对文本进行了布局,这样标题后就没有新行了,例如:
# Some heading
Some text that follows on the line immediately after the heading
尽管上述命令的结果插入了一个额外的 new-line:
Some heading
============
Some text that follows after the heading *and* a new-line
如果我认为添加的 new-line 不是 reStructuredText 的要求是正确的,是否有一些简单的方法可以防止 Pandoc 插入它?
正如@Waylan 评论的那样,在标题后换行被认为是降价的最佳实践风格,因此 Pandoc 插入它们是正确的。