Exception:A highlighting span matched 0 characters, which would cause an endless loop. Change the highlighting definition so that either the start or the end regex matches at least one character. Start regex: # 不含 \\c 模式字符的行首 ^ \t* (?= //[qpXxmsi]+ \t* $ ) End regex: # 后面是任意 // 模式 (?= ^ \t* //[qpXxmsic]* \t* $ )