formatblockhighlightasciidoctor

Emphasizing asciidoctor literal parts


I'd like to to highlight a part of a literal/listing/source block "manually" in AsciiDoctor. Is there any way to do so?

E.g. I'd like to add a class or just a single "strong/b" to some parts, like following.

[literal]
....
000000: 1234 7364 2832 9323
000008: 4823 [.red]#ffff# 4634 7434
000010: 1234 7364 2832 9323
....

Solution

  • You need to turn on quote substitution. Change

    [literal]
    

    to

    [literal, subs="quotes"]
    

    But makes sure your literal block doesn't contain anything else that might be misinterpreted as a quote substitution.