Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the switcher.js makes syntax highlightning from highlight.js disappear. #43

Open
janderssonse opened this issue Mar 16, 2021 · 0 comments

Comments

@janderssonse
Copy link

janderssonse commented Mar 16, 2021

When using the switcher.js as described (for example, here as a passthrough in the asciidoc)

//skin selector for HTML backend
++++

<script src="https://darshandsoni.com/asciidoctor-skins/switcher.js" type="text/javascript"></script>

++++

highlighter.js does not work anymore after a skin has been changed, only the first time. As Highlight.js is one of the supported syntax colourings for asciidoctor, it would be great if the switcher and highlight.js could work together seamslessly.

By having a quick look I think that all that needs do be done in switcher.js would be to make a check if there exits a hljs object and if so just call hljs.initHighlightning() again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant