How do I include visible spaces in code listing in table

17 Views Asked by At

I am writing an asciidoc document to be rendered in html that includes a table in which several cells include code listings. I mark those cells as "a|" and include the listing between ---- lines. I would like to make visible the spaces in quoted strings "like␣this" in the code listing. I replaced the spaces with ␣ characters, but that doesn't work; it just outputs ␣ where the space was. I also tried writing a passthrough with +++␣+++, but that doesn't work either.

How can I write visible space characters in code listings in tables?

1

There are 1 best solutions below

0
user448810 On

The answer is to introduce the listing with [source,subs="+macros"] instead of ----. Asciidoc frequently involves magic.