From dc9e17503ea38ab2b5cf1f7675cae234f2c9dc3a Mon Sep 17 00:00:00 2001 From: Grzegorz Adam Hankiewicz Date: Mon, 2 Dec 2013 20:50:56 +0100 Subject: 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. --- lib/pure/htmlparser.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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) -- cgit 1.4.1-2-gfad0