jeudi 25 mai 2017

highlight.js doesn't auto detect language

I downloaded highlight.pack.js from http://ift.tt/1vmUEx2 and expecting it to highlight <pre><code> block automatically, without specifying any languages.

However an exeption is thrown

Uncaught SyntaxError: Invalid regular expression: /([À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*(<[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*(\s*,\s*[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*)*>)?\s+)+[a-zA-Z_]\w*\s*\(/: Range out of order in character class

But if I specify the language <pre><code class="fsharp"> then everything works fine.




Aucun commentaire:

Enregistrer un commentaire