AsciiDoc 在列表块中添加粗体文本

AsciiDoc add bold text inside a listing block

有一些 AsciiDoc,其中有一个像...

----
  this is a test
    with *some* formatted/tabbed text in it
blah
----

...我希望文本显示为...

  this is a test
    with some formatted/tabbed text in it
blah

...其中单词 "some" 为粗体。

在 AsciiDoc 中,双 ---- 行表示 ListingBlocks,它只保留文本的某些格式方面 (空格格式化),根据AsciiDoc documentation on Delimited Blocks ( with the exception of using [subs="quotes"], as you )。

在分隔块中包含粗体格式的其他方法包括 "Admonition Block"ExampleBlock OpenBlockQuoteBlockSidebarBlock options.


示例块:

**Admonition Block:**
[NOTE]
====
here *is* my text
====

**Example Block:**
====
here *is* my text
====

**Open Block:**
--
here *is* my text
--

**Quote Block:**
[quote, quote author]
____
here *is* my text
____

**Sidebar Block:**
****
here *is* my text
****

示例块输出:

这是我想出的。这个 post 很有帮助...

http://www.methods.co.nz/asciidoc/faq.html#_how_can_i_format_text_inside_a_listing_block

[subs="quotes"]
----
  this is a test
    with *some* formatted/tabbed text in it
blah
----

除了向文本添加格式(在本例中为粗体)之外,这还允许我在文本中保留 formatting/whitespace。

据我所知,这只有在 docbook 代码中才有可能,你可以看到 example here:

++++
<screen>hostname $ <userinput>date</userinput>
Sun Apr  1 12:34:56 GMT 1984</screen>
++++

当然,只有当您的引擎配置了 screenuserinput 的更正样式时,它才会起作用。