2

My goal

I am trying to submit a fix to the Filebeat documentation, written in asciidoc.

Source

Currently it is not possible to recursively fetch all files in all subdirectories of a directory. However, the /** pattern can be used to fetch all files from a predefined level of subdirectories. For example, /var/log/**/*.log and /var/log/**/**/*.log fetch all .log files from the subdirectories and sub-subdirectories of /var/log, respectively. Note that neither fetch log files from the /var/log folder itself.

Result

From asciidoclive.com:

enter image description here

My problem

The /** becomes / in the output, and the words after it are unintentionally marked in bold.

My question

How do I properly escape /** in asciidoc?

1 Answer 1

5

This is tricky, ’cause escaping is de facto broken in Asciidoctor. :(

I know about two possible workarounds:

  • use passthrough: +++\**+++,
  • or define attribute for asterisk, e.g. :star: * and write \{star}{star}.

Yes, it sucks and it’s not easily fixable in Asciidoctor. The best option would be to implement new AsciiDoc parser based on proper grammar etc, Asciidoctor is unfortunately in very bad shape in sense of code-quality. :( (If anyone would be willing to sponsor such project, pls contact me.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.