Lua Syntax Help


I am trying to make an in-game script editor, and I am using a lexer by boatbomber:

However, I’m having trouble coloring the text with RichText, as it repetetively bugs out. Any suggestions for string methods to use?

So yeah. So basically what you do is you have the input box have invisible text.
Then have a textlabel which is below the input box and there you put the RichText.

For each token the parser returns you need to wrap that in richtext tags.
And if you wan’t to prevent issues you need to sanitise the tokens returned by the parser.

Ah yes, that is what I am doing, however. The issue is that when I am using richtext tags on operators, it gets extremely buggy. I was wondering what other string methods would be better for this usecase.