asciidoctor / asciidoctor-reveal.js

:crystal_ball: A reveal.js converter for Asciidoctor and Asciidoctor.js. Write your slides in AsciiDoc!
http://asciidoctor.org
Other
287 stars 189 forks source link

data-fragment-index are not correctly rendered on code blocks #532

Closed jtama closed 2 months ago

jtama commented 2 months ago

Hi, I want to synchronized step-by-step syntax highlighting and fragments block on a slide.

For this I used the following :

[.fragment, java, highlight="1|3|5", step=0]
----
Optional<String> foo();

Optional<String> bar();

Optional<String> foobar();
----

[.fragment,data-fragment-index=0]
Foo
[.fragment,data-fragment-index=1]
Bar
[.fragment,data-fragment-index=2]
Foobar

But that doesn't work because of how code block are rendered (the attribute is assigned on the div .listingblock element.

I have a workaround for this and will make a PR.