mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 23:21:57 +02:00
* The fix in r15551 was not entirely correct. Must handle the case when string ends with a single whitespace.
git-svn-id: trunk@15570 -
This commit is contained in:
parent
a872d84f72
commit
1a50f3ed26
@ -325,11 +325,12 @@ var
|
||||
DoIncJ: Boolean;
|
||||
begin
|
||||
Attr := nil;
|
||||
i := 1;
|
||||
while (i <= Length(s)) and not IsXMLWhitespace(s[i]) do
|
||||
Inc(i);
|
||||
i := 0;
|
||||
repeat
|
||||
Inc(i)
|
||||
until (i > Length(s)) or IsXMLWhitespace(s[i]);
|
||||
|
||||
if i = Length(s) then
|
||||
if i > Length(s) then
|
||||
Result := s
|
||||
else
|
||||
begin
|
||||
|
@ -272,10 +272,12 @@ procedure TSAXXMLReader.EnterNewScannerContext(NewContext: TXMLScannerContext);
|
||||
DoIncJ: Boolean;
|
||||
begin
|
||||
Attr := nil;
|
||||
i := 1;
|
||||
while (i <= Length(s)) and not (s[i] in WhitespaceChars) do
|
||||
Inc(i);
|
||||
if i = Length(s) then
|
||||
i := 0;
|
||||
repeat
|
||||
Inc(i)
|
||||
until (i > Length(s)) or (s[i] in WhitespaceChars);
|
||||
|
||||
if i > Length(s) then
|
||||
Result := LowerCase(s)
|
||||
else
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user