Skip to content

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

@janderssonse

Description

@janderssonse

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions