packages feed

xmlhtml 0.2.0.4 → 0.2.1

raw patch · 2 files changed

+27/−10 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Text.XmlHtml.HTML.Meta: endOmittableLast :: HashSet Text
+ Text.XmlHtml.HTML.Meta: endOmittableNext :: HashMap Text (HashSet Text)
+ Text.XmlHtml.HTML.Meta: predefinedRefs :: HashMap Text Text
+ Text.XmlHtml.HTML.Meta: rawTextTags :: HashSet Text
+ Text.XmlHtml.HTML.Meta: voidTags :: HashSet Text

Files

src/Text/XmlHtml/HTML/Meta.hs view
@@ -1,7 +1,13 @@ {-# OPTIONS_GHC -O0 -fno-case-merge -fno-strictness -fno-cse #-} {-# LANGUAGE OverloadedStrings           #-} -module Text.XmlHtml.HTML.Meta where+module Text.XmlHtml.HTML.Meta+  ( voidTags+  , rawTextTags+  , endOmittableLast+  , endOmittableNext+  , predefinedRefs+  ) where  import           Data.Monoid import           Data.HashMap.Strict (HashMap)@@ -14,6 +20,8 @@ -- Metadata used for HTML5 quirks mode.                                     -- ------------------------------------------------------------------------------ +------------------------------------------------------------------------------+-- | Void elements as defined by the HTML5 spec. {-# NOINLINE voidTags #-} voidTags :: HashSet Text voidTags = S.fromList [@@ -21,21 +29,28 @@     "keygen", "link", "meta", "param", "source", "track", "wbr"     ] +------------------------------------------------------------------------------+-- | Elements that XmlHtml treats as raw text.  Raw text elements are not+-- allowed to have any other tags in them.  This is necessary to support the+-- Javascript less than operator inside a script tag, for example. {-# NOINLINE rawTextTags #-} rawTextTags :: HashSet Text rawTextTags = S.fromList [ "script", "style" ]  --------------------------------------------------------------------------------- | Tags which can be implicitly ended in case they are the last element in--- their parent.  This list actually includes all of the elements that have--- any kind of omittable end tag, since in general when an element with an--- omittable end tag isn't specified to be omittable in this way, it's just--- because in a complete document it isn't expected to ever be the last thing--- in its parent.  We aren't interested in enforcing element structure rules,--- so we'll allow it anyway.+-- | List of elements with omittable end tags. {-# NOINLINE endOmittableLast #-} endOmittableLast :: HashSet Text endOmittableLast = S.fromList [++    -- Tags which can be implicitly ended in case they are the last element in+    -- their parent.  This list actually includes all of the elements that+    -- have any kind of omittable end tag, since in general when an element+    -- with an omittable end tag isn't specified to be omittable in this way,+    -- it's just because in a complete document it isn't expected to ever be+    -- the last thing in its parent.  We aren't interested in enforcing+    -- element structure rules, so we'll allow it anyway.+     "body", "colgroup", "dd", "dt", "head", "html", "li", "optgroup",     "option", "p", "rp", "rt", "tbody", "td", "tfoot", "th", "thead", "tr"     ]@@ -69,6 +84,8 @@     ("tr",       S.fromList ["tr"])     ] +------------------------------------------------------------------------------+-- | Predefined character entity references as defined by the HTML5 spec. {-# NOINLINE predefinedRefs #-} predefinedRefs :: HashMap Text Text predefinedRefs = mconcat $ map M.fromList [
xmlhtml.cabal view
@@ -1,5 +1,5 @@ Name:                xmlhtml-Version:             0.2.0.4+Version:             0.2.1 Synopsis:            XML parser and renderer with HTML 5 quirks mode Description:         Contains renderers and parsers for both XML and HTML 5                      document fragments, which share data structures so that@@ -809,13 +809,13 @@    Exposed-modules:     Text.XmlHtml,                        Text.XmlHtml.Cursor,+                       Text.XmlHtml.HTML.Meta,                        Text.Blaze.Renderer.XmlHtml    Other-modules:       Text.XmlHtml.Common,                        Text.XmlHtml.TextParser,                        Text.XmlHtml.XML.Parse,                        Text.XmlHtml.XML.Render,-                       Text.XmlHtml.HTML.Meta,                        Text.XmlHtml.HTML.Parse,                        Text.XmlHtml.HTML.Render