@@ -503,16 +503,35 @@ blockHtmlTags = ["address", "blockquote", "body", "center", "dir", "div",
503 "dt", "frameset", "li", "tbody", "td", "tfoot",
503 "dt", "frameset", "li", "tbody", "td", "tfoot",
504 "th", "thead", "tr", "script", "style"]
504 "th", "thead", "tr", "script", "style"]
506+-- We want to allow raw docbook in markdown documents, so we
507+-- include docbook block tags here too.
508+blockDocBookTags :: [String]
509+blockDocBookTags = ["calloutlist", "bibliolist", "glosslist", "itemizedlist",
510+ "orderedlist", "segmentedlist", "simplelist",
511+ "variablelist", "caution", "important", "note", "tip",
512+ "warning", "address", "literallayout", "programlisting",
513+ "programlistingco", "screen", "screenco", "screenshot",
514+ "synopsis", "example", "informalexample", "figure",
515+ "informalfigure", "table", "informaltable", "para",
516+ "simpara", "formalpara", "equation", "informalequation",
517+ "figure", "screenshot", "mediaobject", "qandaset",
518+ "procedure", "task", "cmdsynopsis", "funcsynopsis",
519+ "classsynopsis", "blockquote", "epigraph", "msgset",
522+blockTags :: [String]
523+blockTags = blockHtmlTags ++ blockDocBookTags
506isInlineTag :: Tag String -> Bool
525isInlineTag :: Tag String -> Bool
507−isInlineTag t = tagOpen (`notElem` blockHtmlTags) (const True) t ||
526+isInlineTag t = tagOpen (`notElem` blockTags) (const True) t ||
508− tagClose (`notElem` blockHtmlTags) t ||
527+ tagClose (`notElem` blockTags) t ||
509 tagComment (const True) t
528 tagComment (const True) t
511isBlockTag :: Tag String -> Bool
530isBlockTag :: Tag String -> Bool
512isBlockTag t = tagOpen (`elem` blocktags) (const True) t ||
531isBlockTag t = tagOpen (`elem` blocktags) (const True) t ||
513 tagClose (`elem` blocktags) t ||
532 tagClose (`elem` blocktags) t ||
514 tagComment (const True) t
533 tagComment (const True) t
515− where blocktags = blockHtmlTags ++ eitherBlockOrInline
534+ where blocktags = blockTags ++ eitherBlockOrInline
517isTextTag :: Tag String -> Bool
536isTextTag :: Tag String -> Bool
518isTextTag = tagText (const True)
537isTextTag = tagText (const True)
@@ -547,8 +566,8 @@ t `closes` t2 |
547 t `elem` ["h1","h2","h3","h4","h5","h6","dl","ol","ul","table","div","p"] &&
566 t `elem` ["h1","h2","h3","h4","h5","h6","dl","ol","ul","table","div","p"] &&
548 t2 `elem` ["h1","h2","h3","h4","h5","h6","p" ] = True -- not "div"
567 t2 `elem` ["h1","h2","h3","h4","h5","h6","p" ] = True -- not "div"
549t1 `closes` t2 |
568t1 `closes` t2 |
550− t1 `elem` blockHtmlTags &&
569+ t1 `elem` blockTags &&
551− t2 `notElem` (blockHtmlTags ++ eitherBlockOrInline) = True
570+ t2 `notElem` (blockTags ++ eitherBlockOrInline) = True
552_ `closes` _ = False
571_ `closes` _ = False
554--- parsers for use in markdown, textile readers
573--- parsers for use in markdown, textile readers