4


I frequently use blocks of code in my asciidoc. The biggest issue I have is that shell commands beginning with '#' (because they use a root's shell) are rendered as comments in the asciidoc. For example:

[source,shell]
----    
# firewall-cmd --permanent --new-zone dockerc
----

This make the reading a bit confusing. Is there a way to use a shell piece of code, overriding the 'behaviour' ? Thanks

1 Answer 1

2

Maybe you need to set a source-highlighter For me the following example worked for HTML:

= Foo
:source-highlighter: coderay

[source,shell]
----
# firewall-cmd --permanent --new-zone dockerc
--------

Or can you post a screenshot of how your output looks like?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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