Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ece36f17
Commit
ece36f17
authored
Sep 29, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite: Fix node type for whitespace text nodes in Content.
parent
249b4578
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
reader.c
dlls/xmllite/reader.c
+4
-1
reader.c
dlls/xmllite/tests/reader.c
+4
-0
No files found.
dlls/xmllite/reader.c
View file @
ece36f17
...
...
@@ -2205,7 +2205,7 @@ static HRESULT reader_parse_chardata(xmlreader *reader)
ptr
=
start
=
reader_get_cur
(
reader
);
/* There's no text */
if
(
!*
ptr
||
*
ptr
==
'<'
)
return
S_OK
;
reader
->
nodetype
=
XmlNodeType_Text
;
reader
->
nodetype
=
is_wchar_space
(
*
ptr
)
?
XmlNodeType_Whitespace
:
XmlNodeType_Text
;
reader
->
resume
[
XmlReadResume_Body
]
=
start
;
reader
->
resumestate
=
XmlReadResumeState_CharData
;
reader_set_strvalue
(
reader
,
StringValue_LocalName
,
&
strval_empty
);
...
...
@@ -2232,6 +2232,9 @@ static HRESULT reader_parse_chardata(xmlreader *reader)
}
reader_skipn
(
reader
,
1
);
/* this covers a case when text has leading whitespace chars */
if
(
!
is_wchar_space
(
*
ptr
))
reader
->
nodetype
=
XmlNodeType_Text
;
ptr
++
;
}
...
...
dlls/xmllite/tests/reader.c
View file @
ece36f17
...
...
@@ -943,11 +943,13 @@ static const char misc_test_xml[] =
"
\t
\r
\n
"
"<!-- comment4 -->"
"<a>"
"
\r\n\t
"
"<b/>"
"text"
"<!-- comment -->"
"text2"
"<?pi pibody ?>"
"
\r\n
"
"</a>"
;
...
...
@@ -961,11 +963,13 @@ static struct nodes_test misc_test = {
XmlNodeType_Whitespace
,
XmlNodeType_Comment
,
XmlNodeType_Element
,
XmlNodeType_Whitespace
,
XmlNodeType_Element
,
XmlNodeType_Text
,
XmlNodeType_Comment
,
XmlNodeType_Text
,
XmlNodeType_ProcessingInstruction
,
XmlNodeType_Whitespace
,
XmlNodeType_EndElement
,
XmlNodeType_None
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment