SynEdit: fix endless XML HL, do not return empty tokens.

This commit is contained in:
Martin 2024-04-28 13:35:35 +02:00
parent 6b9d5774e7
commit 3c41d81f5d

View File

@ -792,29 +792,33 @@ end;
procedure TSynXMLSyn.Next; procedure TSynXMLSyn.Next;
begin begin
fTokenPos := Run; fTokenPos := Run;
case fRange of while fTokenPos = Run do begin
rsText: case fRange of
begin rsText:
TextProc(); begin
TextProc();
end;
rsComment:
begin
CommentProc();
end;
rsProcessingInstruction:
begin
ProcessingInstructionProc();
end;
rsDocType, rsDocTypeSquareBraces: //ek 2001-11-11
begin
DocTypeProc();
end;
rsCDATA:
begin
CDATAProc();
end;
else
fProcTable[fLine[Run]]();
end; end;
rsComment: if fTokenId = tkNull then // EOL
begin break;
CommentProc();
end;
rsProcessingInstruction:
begin
ProcessingInstructionProc();
end;
rsDocType, rsDocTypeSquareBraces: //ek 2001-11-11
begin
DocTypeProc();
end;
rsCDATA:
begin
CDATAProc();
end;
else
fProcTable[fLine[Run]]();
end; end;
end; end;