Pandoc:转义 HTML 选项 [英] Pandoc: escape HTML option

查看:63
本文介绍了Pandoc:转义 HTML 选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

虽然其他 Markdown 实现有转义 HTML 的开关,但我找不到用于 Pandoc 的开关.

While other markdown implementations have a switch to escape HTML, I couldn't find one for Pandoc.

我希望 Pandoc 将 HELLO WORLD 转换为

HELLO &lt;blink>WORLD&lt;/blink></p>.

I want Pandoc to convert HELLO <blink>WORLD</blink> to <p>HELLO &lt;blink>WORLD&lt;/blink></p>.

Kramdown 和 Maruku 似乎不支持这个,Pandoc 怎么样?

Kramdown and Maruku don't seem to support this, how about Pandoc?

推荐答案

您可以使用以下命令编译禁用扩展raw_html:

You can disable the extension raw_html by using this command to compile:

pandoc -f markdown-raw_html -t html

尽管输出与您预期的输出不完全匹配,因为它也会将 > 转换为 &gt;.

Although the output does not exactly matches your expected output because it will also transform > to &gt;.

这篇关于Pandoc:转义 HTML 选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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