git.iko.soy/typeable/pandoc
on master help sign in
HTML reader: adjust `blockTags` and `eitherBlockOrInline`.

- Added `audio` and `source` in `eitherBlockOrInline`. - Moved `video`, `svg`, `progress`, `script`, `noscript`, `svg` from `blockTags` to `eitherBlockOrInline`. - `map` and `object` were mistakenly in both lists; they have been removed from `blockTags`.

commitcbeb93155493a54d9de6578911ca1ffd3d97d926 authorJohn MacFarlane <jgm@berkeley.edu> dateMon 7 Jul 2014, 11:24 (12 years ago) parent186b8e7
1 file changed+13−9
src/Text/Pandoc/Readers/HTML.hs+13−9
src/Text/Pandoc/Readers/HTML.hs+13−9
@@ -566,8 +566,10 @@ pSpace = many1 (satisfy isSpace) >> return B.space
566566--
567567
568568eitherBlockOrInline :: [String]
569−eitherBlockOrInline = ["applet", "button", "del", "iframe", "ins",
570− "map", "area", "object"]
569+eitherBlockOrInline = ["audio", "applet", "button", "iframe",
570+ "del", "ins",
571+ "progress", "map", "area", "noscript", "script",
572+ "object", "svg", "video", "source"]
571573
572574{-
573575inlineHtmlTags :: [[Char]]
@@ -579,15 +581,17 @@ inlineHtmlTags = ["a", "abbr", "acronym", "b", "basefont", "bdo", "big",
579581-}
580582
581583blockHtmlTags :: [String]
582−blockHtmlTags = ["address", "article", "aside", "blockquote", "body", "button", "canvas",
584+blockHtmlTags = ["address", "article", "aside",
585+ "blockquote", "body", "button", "canvas",
583586 "caption", "center", "col", "colgroup", "dd", "dir", "div",
584− "dl", "dt", "embed", "fieldset", "figcaption", "figure", "footer",
585− "form", "h1", "h2", "h3", "h4",
586− "h5", "h6", "head", "header", "hgroup", "hr", "html", "isindex", "map", "menu",
587− "noframes", "noscript", "object", "ol", "output", "p", "pre", "progress",
588− "section", "table", "tbody", "textarea", "thead", "tfoot", "ul", "dd",
587+ "dl", "dt", "embed", "fieldset", "figcaption", "figure",
588+ "footer", "form", "h1", "h2", "h3", "h4",
589+ "h5", "h6", "head", "header", "hgroup", "hr", "html",
590+ "isindex", "menu", "noframes", "ol", "output", "p", "pre",
591+ "section", "table", "tbody", "textarea",
592+ "thead", "tfoot", "ul", "dd",
589593 "dt", "frameset", "li", "tbody", "td", "tfoot",
590− "th", "thead", "tr", "script", "style", "svg", "video"]
594+ "th", "thead", "tr", "script", "style"]
591595
592596-- We want to allow raw docbook in markdown documents, so we
593597-- include docbook block tags here too.