lex-highlight is a syntax highlighter written according to the lexical analyzer. So it can correctly analyze all kinds of tokens. and It supports advanced features such as string interpolation and language nesting.
the open source of lex-highlight is here
A demo is here, to test rendered result, you can open the /dist/index.html file with a browser.