Makes htmlparser handle whitespace. Refs #694.
Without the flag, htmlparser will ignore some significant whitespace in HTML files. A more correct fix would be to not reuse the xml parser since the rules for HTML are slightly different, but this will do for the moment.
This commit is contained in:
parent
5dcfa97fb9
commit
dc9e17503e
1 changed files with 1 additions and 1 deletions
|
|
@ -528,7 +528,7 @@ proc parseHtml*(s: PStream, filename: string,
|
||||||
## parses the XML from stream `s` and returns a ``PXmlNode``. Every
|
## parses the XML from stream `s` and returns a ``PXmlNode``. Every
|
||||||
## occured parsing error is added to the `errors` sequence.
|
## occured parsing error is added to the `errors` sequence.
|
||||||
var x: TXmlParser
|
var x: TXmlParser
|
||||||
open(x, s, filename, {reportComments})
|
open(x, s, filename, {reportComments, reportWhitespace})
|
||||||
next(x)
|
next(x)
|
||||||
# skip the DOCTYPE:
|
# skip the DOCTYPE:
|
||||||
if x.kind == xmlSpecial: next(x)
|
if x.kind == xmlSpecial: next(x)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue