Open abul4fia opened 5 months ago
Lines are suddenly numbered
Did you try to enable line numbering? https://docs.asciidoctor.org/asciidoc/latest/verbatim/source-highlighter/#enable-line-numbering
Line numbering is not enabled by default.
[%linenums,ruby]
----
puts 1
puts 2
puts 3
----
Syntax colouring disappears. Everything is gray
Are you using a custom CSS.
FWIW
if I try to highlight one line
- Lines are suddenly numbered
this is not specific to Asciidoctor and a kinda feature of reveal.js
itself - line numbers and lines highlighting are controlled by the same data-line-numbers
, see https://revealjs.com/code/#line-numbers-%26-highlights
You can enable line numbers by adding data-line-numbers to your \<code> tags. If you want to highlight specific lines you can provide a comma separated list of line numbers using the same attribute.
however one can hide line numbers using custom CSS
.hljs-ln-numbers {
display: none;
}
- Syntax colouring disappears.
seems to be specific to Asciidoc when #
presented in code block
I don't know if I'm doing something wrong. My setup is:
If I wrote code such as:
then all works as expected, and I get coloured syntax in the slide:
But if I try to highlight one line:
Then two unexpected things happen:
I'm using
I'm I doing something wrong? Is this a known issue? I was unable to find anything...