From 5bac8cd8558048292bdc071fe09aa80191677719 Mon Sep 17 00:00:00 2001 From: Stephane Fontaine Date: Wed, 27 Jul 2016 15:14:34 +0400 Subject: htmlparser: Allow

as children of

and
  • --- lib/pure/htmlparser.nim | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/pure') diff --git a/lib/pure/htmlparser.nim b/lib/pure/htmlparser.nim index fd58bed25..1fe0b297b 100644 --- a/lib/pure/htmlparser.nim +++ b/lib/pure/htmlparser.nim @@ -464,12 +464,18 @@ proc untilElementEnd(x: var XmlParser, result: XmlNode, case x.kind of xmlElementStart, xmlElementOpen: case result.htmlTag - of tagLi, tagP, tagDt, tagDd, tagInput, tagOption: - # some tags are common to have no ````, like ``
  • ``: + of tagP, tagInput, tagOption: + # some tags are common to have no ````, like ``
  • `` but + # allow ``

    `` in `

    `, `
    ` and ``
  • `` in next case if htmlTag(x.elemName) in {tagLi, tagP, tagDt, tagDd, tagInput, tagOption}: errors.add(expected(x, result)) break + of tagDd, tagDt, tagLi: + if htmlTag(x.elemName) in {tagLi, tagDt, tagDd, tagInput, + tagOption}: + errors.add(expected(x, result)) + break of tagTd, tagTh: if htmlTag(x.elemName) in {tagTr, tagTd, tagTh, tagTfoot, tagThead}: errors.add(expected(x, result)) -- cgit 1.4.1-2-gfad0