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

Carla
  • 3,064
  • 8
  • 36
  • 65

1 Answers1

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?