mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 05:06:03 +02:00
SAX readers: never transition from scText to scWhitespace state, and don't reset token while transitioning from scWhitespace to scText. This ensures that only pure-whitespace chunks are ever reported via IgnorableWhitespace event, and that text nodes are not broken into words.
This provides a partial fix for Mantis #14073. git-svn-id: trunk@13355 -
This commit is contained in:
parent
ccb730c051
commit
5f45dd409b
@ -193,12 +193,10 @@ begin
|
|||||||
EnterNewScannerContext(scTag);
|
EnterNewScannerContext(scTag);
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
EnterNewScannerContext(scText);
|
FScannerContext := scText;
|
||||||
end;
|
end;
|
||||||
scText:
|
scText:
|
||||||
case Buffer[BufferPos] of
|
case Buffer[BufferPos] of
|
||||||
#9, #10, #13, ' ':
|
|
||||||
EnterNewScannerContext(scWhitespace);
|
|
||||||
'&':
|
'&':
|
||||||
begin
|
begin
|
||||||
Inc(BufferPos);
|
Inc(BufferPos);
|
||||||
|
@ -184,12 +184,10 @@ begin
|
|||||||
EnterNewScannerContext(scTag);
|
EnterNewScannerContext(scTag);
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
EnterNewScannerContext(scText);
|
FScannerContext := scText
|
||||||
end;
|
end;
|
||||||
scText:
|
scText:
|
||||||
case Buffer[BufferPos] of
|
case Buffer[BufferPos] of
|
||||||
#9, #10, #13, ' ':
|
|
||||||
EnterNewScannerContext(scWhitespace);
|
|
||||||
'&':
|
'&':
|
||||||
begin
|
begin
|
||||||
Inc(BufferPos);
|
Inc(BufferPos);
|
||||||
|
Loading…
Reference in New Issue
Block a user