mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 06:18:51 +00:00
fixes #492
This commit is contained in:
@@ -544,6 +544,8 @@ proc parseHtml*(s: PStream, filename: string,
|
||||
# force progress!
|
||||
next(x)
|
||||
close(x)
|
||||
if result.len == 1:
|
||||
result = result[0]
|
||||
|
||||
proc parseHtml*(s: PStream): PXmlNode =
|
||||
## parses the XTML from stream `s` and returns a ``PXmlNode``. All parsing
|
||||
|
||||
@@ -110,11 +110,9 @@ proc parseXml*(s: PStream, filename: string,
|
||||
of xmlElementOpen, xmlElementStart:
|
||||
result = parse(x, errors)
|
||||
break
|
||||
of xmlComment, xmlWhitespace: nil # just skip it
|
||||
of xmlComment, xmlWhitespace, xmlSpecial: nil # just skip it
|
||||
of xmlError:
|
||||
errors.add(errorMsg(x))
|
||||
of xmlSpecial:
|
||||
errors.add(errorMsg(x, "<some_tag> expected"))
|
||||
else:
|
||||
errors.add(errorMsg(x, "<some_tag> expected"))
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user