【发布时间】:2019-04-18 21:28:25
【问题描述】:
我想用 pandoc 把这个 HTML 的 sn-p 翻译成 Markdown。
<code class="code_block"># chown root:root /boot/grub/grub.cfg<br/># chmod og-rwx /boot/grub/grub.cfg
</code>
我想要的输出是这样的。
```
# chown root:root /boot/grub/grub.cfg
# chmod og-rwx /boot/grub/grub.cfg
```
但输出 I 从未在降价文件中分别包含 <br> 换行符。
# chown root:root /boot/grub/grub.cfg# chmod og-rwx /boot/grub/grub.cfg
我已经尝试过不同的命令和扩展。
$ pandoc -f html -t markdown t.html
$ pandoc -f html -t markdown+hard_line_breaks t.html
$ pandoc -f html -t markdown+raw_html+hard_line_breaks t.html
$ pandoc -f html -t markdown+raw_html+hard_line_breaks-inline_code_attributes t.html
我错过了什么吗?
【问题讨论】: