Custom highlight.js display errors
n-bes opened this issue · 3 comments
Hi.
I have problem with local copy of reveal.js
and highlight.js
Steps
-
Download
highlight.js
from https://highlightjs.org/download/ folder and unpack archive to folderHighlight.js v11.7.0 (git: 82688fad18)
-
Download
reveal.js
from GitHub:git clone -b 3.9.2 --depth 1 https://github.com/hakimel/reveal.js.git
-
asciidoctor-revealjs version:
╰─➤ asciidoctor-revealjs-macos --version Asciidoctor reveal.js 4.1.0 using Asciidoctor.js 2.2.1 (Asciidoctor 2.0.12) [https://asciidoctor.org] Runtime Environment (node v12.13.1 on darwin) CLI version 3.2.0
-
Build demo:
asciidoctor-revealjs-macos demo.adoc
-
Show directory data:
╰─➤ tree -L 1 . . ├── demo.adoc ├── demo.html ├── highlight └── reveal.js
Code
Comment highlightjsdit
, highlightjs-theme
to use bundled version.
= Hello
:revealjsdir: reveal.js
:revealjs_theme: white
:revealjs_controls: false
:highlightjsdir: highlight
:highlightjs-theme: highlight/styles/stackoverflow-dark.min.css
:source-highlighter: highlightjs
== Test
[source,java]
----
public class TestClass {
public TestClass() {
}
public void testMethod() {
}
}
----
[source,java,linenums,highlight=2..3]
----
public class TestClass {
public TestClass() {
}
public void testMethod() {
}
}
----
Results
As far as I remember reveal.js 3.9.2 is not compatible with Highlight.js >= 10. You should use highlight.js 9.18.0.
@Mogztter I found this part:
Originally, i tried to change theme, but without success
this commit is only available on 5.0.0-rc.1 (based on reveal.js 4):
https://github.com/asciidoctor/asciidoctor-reveal.js/releases/tag/v5.0.0-rc.1