diff options
author | Grzegorz Adam Hankiewicz <gradha@imap.cc> | 2013-12-02 20:50:56 +0100 |
---|---|---|
committer | Grzegorz Adam Hankiewicz <gradha@imap.cc> | 2013-12-02 20:55:55 +0100 |
commit | dc9e17503ea38ab2b5cf1f7675cae234f2c9dc3a (patch) | |
tree | 5bbcff092d3d94bb0e06af7a273c6e4b977b4d41 | |
parent | 5dcfa97fb959eda3cb8a41e2bd39e998c30052c8 (diff) | |
download | Nim-dc9e17503ea38ab2b5cf1f7675cae234f2c9dc3a.tar.gz |
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.
-rw-r--r-- | lib/pure/htmlparser.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/htmlparser.nim b/lib/pure/htmlparser.nim index d60d2e583..7bcc501a7 100644 --- a/lib/pure/htmlparser.nim +++ b/lib/pure/htmlparser.nim @@ -528,7 +528,7 @@ proc parseHtml*(s: PStream, filename: string, ## parses the XML from stream `s` and returns a ``PXmlNode``. Every ## occured parsing error is added to the `errors` sequence. var x: TXmlParser - open(x, s, filename, {reportComments}) + open(x, s, filename, {reportComments, reportWhitespace}) next(x) # skip the DOCTYPE: if x.kind == xmlSpecial: next(x) |