snapframework/xmlhtml — Issue #7: parsing of itemscope is order-dependent
Author: warrenharris
Created: 2012-02-24 05:23:18+00:00
State: open

{-# LANGUAGE OverloadedStrings #-}
import Text.XmlHtml
tree1 = parseHTML "" "

"
tree2 = parseHTML "" "

" -- this order fails to parse

*Main> tree1
Right (HtmlDocument {docEncoding = UTF8, docType = Nothing, docContent = [Element {elementTag = "div", elementAttrs = [("itemtype","type"),("itemscope","")], elementChildren = []}]})
*Main> tree2
Left "(line 1, column 16):\nunexpected \"i\"\nexpecting \"=\", \"/\" or \">\""