Any danger in zero-character tokens?


#1

I’m writing a custom mode, and was wondering if there is any problem in having a token that represents zero characters. From the perspective of the renderer, you end up with

<span class = "cm-before">blah</span> <span class = "cm-zero-width"></span> <span class = "cm-after">something</span>


#2

CodeMirror won’t render such tokens, so while there’s no danger in them (unless you keep returning the same zero-character token and thus prevent the tokenizer from making progress), they don’t do what you were hoping for.