asciidoc 中行首的文字星号到 html 的转换

Literal asterisk in the beginning of the line in asciidoc to html conversion

a * a 这样的 AsciiDoc 源被转换为 HTML 作为普通文本 "a * a"。如果星号是该行中的第一个非 space 字符,它会启动一个列表(这是正常的)。但是,我需要用文字星号开始一个段落。我尝试了以下方法来逃避它:

如何在 AsciiDoc 源文件的行首指定一个星号,使其在 HTML 输出中显示为普通文本?

我知道你有两个选择。将其转换为列表的模式具体是星号后跟 space。

* item

将像这样呈现:

  • 项目

您可以省略 space 或使用 space 属性。

*item
*{sp}item

将像这样呈现(分别):

*项目
* 项目

可以在此处找到有关属性和替换的更多信息: http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#attributes-and-substitutions

结果是 inline passthroughs a different form of pass is required. I also checked the solution suggested by 。我总结了以下选项:

  • 直通:
    • pass:[*]
    • +++*+++
    • $$*$$
  • 打扰列表模式
    • {empty}*("official" 来自 FAQ 的解决方案)
    • *text
    • *{sp}
  • HTML 转义
    • *
    • *