如何在Asciidoctor Asciidoc中避开双加加符号“++”?

3
例如,如果我写下以下内容:
Notepad++ is *great*, I like Notepad++

在IT技术中,++something++被视为转义结构,忽略粗体标记*并输出:

<p>Notepad is *great*, I like Notepad</p>

所期望的是:

<p>Notepad++ is <strong>great</strong>, I like Notepad++</p>

上游讨论:https://github.com/asciidoctor/asciidoctor/issues/1864

在Asciidoctor 2.0.10上测试通过。

2个回答

5

满足我需求的几个选项:

Notepadpass:[++] is *great*, I like Notepadpass:[++]

Notepad{blank}pass:[++] is *great*, I like Notepad{blank}pass:[++]

Notepad{plus}{plus} is *great*, I like Notepad{plus}{plus}

我不确定Notepadpass:[++]是打算这样使用还是一个偶然事件。我认为我会使用{plus}{plus}

其中{plus}的说明在此文档https://asciidoctor.org/docs/user-manual/#charref-attributes中。

对于特定的C++情况,也有{cpp}


1
另一种选择是使用反斜杠来转义第一个++:
Notepad\++ is *great*, I like Notepad++

这在其他格式方面也是以类似的方式工作。


已在 Asciidoctor 2.0.11 上进行测试。 - Ciro Santilli OurBigBook.com

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接