felixfbecker / cli-highlight

Syntax highlighting for your terminal 💻✨

Home Page:https://cli-highlight.surge.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parse HTML with parser instead of RegExp

felixfbecker opened this issue · comments

Currently a RegExp is used, which works for JSON and SQL, but not for languages where the tokens get nested like XML.

Could either use a basic HTML parser or construct a DOM and do a depth-first tree traversal to wrap the nodes.