git.iko.soy/typeable/pandoc
on master help sign in
DocBook reader: Implemented important, note, caution, tip, warning.
commit6a3e60504ed962fe54003e7404c5b606bd15b4b4 authorJohn MacFarlane <fiddlosopher@gmail.com> dateSat 5 May 2012, 19:58 (14 years ago) parentd8dc57d
1 file changed+16−6
src/Text/Pandoc/Readers/DocBook.hs+16−6
src/Text/Pandoc/Readers/DocBook.hs+16−6
@@ -66,7 +66,7 @@ List of all DocBook tags, with [x] indicating implemented,
6666[ ] callout - A “called out” description of a marked Area
6767[ ] calloutlist - A list of Callouts
6868[x] caption - A caption
69−[ ] caution - A note of caution
69+[x] caution - A note of caution
7070[x] chapter - A chapter, as of a book
7171[ ] chapterinfo - Meta-information for a Chapter
7272[ ] citation - An inline bibliographic reference to another published work
@@ -168,12 +168,12 @@ List of all DocBook tags, with [x] indicating implemented,
168168[ ] hardware - A physical part of a computer system
169169[ ] highlights - A summary of the main points of the discussed component
170170[ ] holder - The name of the individual or organization that holds a copyright
171−[ ] honorific - The title of a person
171+[o] honorific - The title of a person
172172[ ] html:form - An HTML form
173173[ ] imagedata - Pointer to external image data
174174[ ] imageobject - A wrapper for image data and its associated meta-information
175175[ ] imageobjectco - A wrapper for an image object with callouts
176−[ ] important - An admonition set off from the text
176+[x] important - An admonition set off from the text
177177[ ] index - An index
178178[ ] indexdiv - A division in an index
179179[ ] indexentry - An entry in an index
@@ -252,7 +252,7 @@ List of all DocBook tags, with [x] indicating implemented,
252252[ ] msgsub - A subcomponent of a message in a message set
253253[ ] msgtext - The actual text of a message component in a message set
254254[ ] nonterminal - A non-terminal in an EBNF production
255−[ ] note - A message set off from the text
255+[x] note - A message set off from the text
256256[ ] objectinfo - Meta-information for an object
257257[ ] olink - A link that addresses its target indirectly, through an entity
258258[ ] ooclass - A class in an object-oriented programming language
@@ -440,7 +440,7 @@ List of all DocBook tags, with [x] indicating implemented,
440440[ ] tgroup - A wrapper for the main content of a table, or part of a table
441441[ ] th - A table header entry in an HTML table
442442[ ] thead - A table header consisting of one or more rows
443−[ ] tip - A suggestion to the user, set off from the text
443+[x] tip - A suggestion to the user, set off from the text
444444[x] title - The text of the title of a section of a document or of a formal
445445 block-level element
446446[x] titleabbrev - The abbreviation of a Title
@@ -482,7 +482,7 @@ List of all DocBook tags, with [x] indicating implemented,
482482 function in question takes no arguments
483483[ ] volumenum - The volume number of a document in a set (as of books in a set
484484 or articles in a journal)
485−[ ] warning - An admonition set off from the text
485+[x] warning - An admonition set off from the text
486486[x] wordasword - A word meant specifically as a word and not representing
487487 anything else
488488[ ] xref - A cross reference to another part of the document
@@ -580,6 +580,16 @@ parseBlock (Elem e) =
580580 "refsect2" -> sect 2
581581 "refsect3" -> sect 3
582582 "refsection" -> gets dbSectionLevel >>= sect . (+1)
583+ "important" -> blockQuote . (para (strong $ str "Important") <>)
584+ <$> getBlocks e
585+ "caution" -> blockQuote . (para (strong $ str "Caution") <>)
586+ <$> getBlocks e
587+ "note" -> blockQuote . (para (strong $ str "Note") <>)
588+ <$> getBlocks e
589+ "tip" -> blockQuote . (para (strong $ str "Tip") <>)
590+ <$> getBlocks e
591+ "warning" -> blockQuote . (para (strong $ str "Warning") <>)
592+ <$> getBlocks e
583593 "qandadiv" -> gets dbSectionLevel >>= sect . (+1)
584594 "question" -> addToStart (strong (str "Q:") <> str " ") <$> getBlocks e
585595 "answer" -> addToStart (strong (str "A:") <> str " ") <$> getBlocks e