Protect the SyntaxTokenizer (which returns a StyledDocument) against cases where a Segment length is less than the Token length, or the Token length is -1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Protect the SyntaxTokenizer (which returns a StyledDocument) against cases where a Segment length is less than the Token length, or the Token length is -1