This PR makes the highlightNode function detect whether a snippet's AST was generated by the new or the old parser, and handles the highlighting accordingly. If the AST was generated by the old parser, the node's type property is used. If it was generated by the new one, then the last element of its tags array is used.
Fixes #42.
This PR makes the
highlightNode
function detect whether a snippet's AST was generated by the new or the old parser, and handles the highlighting accordingly. If the AST was generated by the old parser, the node'stype
property is used. If it was generated by the new one, then the last element of itstags
array is used.