Thanks for the reply. I tried that solution as well. It didn’t work as it is. When I added {extend: true} it worked. But the I get performance issues with the parser. And when there is a syntax error in some position in the input, the syntax highlighting breaks for the rest of the input.
Is there anything wrong I am doing in the tokenizer function that you can spot?