git.iko.soy/typeable/pandoc
on master help sign in
DocBook reader: handle informalexample.

It is parsed into a Div with class `informalexample`. Closes #2319.

commiteaccef14918da98dc9837339070bda78cab64f1c authorJohn MacFarlane <jgm@berkeley.edu> dateSat 8 Aug 2015, 10:43 (11 years ago) parentbf7d858
1 file changed+4−1
src/Text/Pandoc/Readers/DocBook.hs+4−1
src/Text/Pandoc/Readers/DocBook.hs+4−1
@@ -194,7 +194,7 @@ List of all DocBook tags, with [x] indicating implemented,
194194[x] indexterm - A wrapper for terms to be indexed
195195[x] info - A wrapper for information about a component or other block. (DocBook v5)
196196[x] informalequation - A displayed mathematical equation without a title
197−[ ] informalexample - A displayed example without a title
197+[x] informalexample - A displayed example without a title
198198[ ] informalfigure - A untitled figure
199199[ ] informaltable - A table without a title
200200[ ] initializer - The initializer for a FieldSynopsis
@@ -611,6 +611,7 @@ isBlockElement (Elem e) = qName (elName e) `elem` blocktags
611611 "important","caution","note","tip","warning","qandadiv",
612612 "question","answer","abstract","itemizedlist","orderedlist",
613613 "variablelist","article","book","table","informaltable",
614+ "informalexample",
614615 "screen","programlisting","example","calloutlist"]
615616isBlockElement _ = False
616617
@@ -766,6 +767,8 @@ parseBlock (Elem e) =
766767 "book" -> modify (\st -> st{ dbBook = True }) >> getBlocks e
767768 "table" -> parseTable
768769 "informaltable" -> parseTable
770+ "informalexample" -> divWith ("", ["informalexample"], []) <$>
771+ getBlocks e
769772 "literallayout" -> codeBlockWithLang
770773 "screen" -> codeBlockWithLang
771774 "programlisting" -> codeBlockWithLang