Skip to content

Commit

Permalink
DocBook reader: Implemented screen, quandadiv, ackno.
Browse files Browse the repository at this point in the history
  • Loading branch information
John MacFarlane committed May 2, 2012
1 parent 9961dc2 commit cbfd187
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions src/Text/Pandoc/Readers/DocBook.hs
Expand Up @@ -11,15 +11,16 @@ import Data.List (intersperse)

{-
List of all DocBook tags, with [x] indicating implemented:
List of all DocBook tags, with [x] indicating implemented,
[o] meaning intentionally left unimplemented (pass through):
[ ] abbrev - An abbreviation, especially one followed by a period
[o] abbrev - An abbreviation, especially one followed by a period
[x] abstract - A summary
[ ] accel - A graphical user interface (GUI) keyboard shortcut
[ ] ackno - Acknowledgements in an Article
[ ] acronym - An often pronounceable word made from the initial
[ ] action - A response to a user event
[ ] address - A real-world address, generally a postal address
[o] accel - A graphical user interface (GUI) keyboard shortcut
[x] ackno - Acknowledgements in an Article
[o] acronym - An often pronounceable word made from the initial
[o] action - A response to a user event
[o] address - A real-world address, generally a postal address
[ ] affiliation - The institutional affiliation of an individual
[ ] alt - Text representation for a graphical element
[ ] anchor - A spot in the document
Expand Down Expand Up @@ -305,7 +306,7 @@ List of all DocBook tags, with [x] indicating implemented:
[ ] publishername - The name of the publisher of a document
[ ] pubsnumber - A number assigned to a publication other than an ISBN or ISSN
or inventory part number
[ ] qandadiv - A titled division in a QandASet
[x] qandadiv - A titled division in a QandASet
[ ] qandaentry - A question/answer set within a QandASet
[ ] qandaset - A question-and-answer set
[ ] question - A question in a QandASet
Expand Down Expand Up @@ -349,9 +350,9 @@ List of all DocBook tags, with [x] indicating implemented:
[ ] rhs - The right-hand side of an EBNF production
[ ] row - A row in a table
[ ] sbr - An explicit line break in a command synopsis
[ ] screen - Text that a user sees or might see on a computer screen
[ ] screenco - A screen with associated areas used in callouts
[ ] screeninfo - Information about how a screen shot was produced
[x] screen - Text that a user sees or might see on a computer screen
[o] screenco - A screen with associated areas used in callouts
[o] screeninfo - Information about how a screen shot was produced
[ ] screenshot - A representation of what the user sees or might see on a
computer screen
[ ] secondary - A secondary word or phrase in an index term
Expand Down Expand Up @@ -546,6 +547,7 @@ parseBlock (Text (CData _ s _)) = if all isSpace s
parseBlock (Elem e) =
case qName (elName e) of
"para" -> para <$> getInlines e
"ackno" -> para <$> getInlines e
"blockquote" -> do
attrib <- case filterChild (named "attribution") e of
Nothing -> return mempty
Expand All @@ -566,6 +568,7 @@ parseBlock (Elem e) =
"sect4" -> sect 4
"sect5" -> sect 5
"section" -> gets dbSectionLevel >>= sect . (+1)
"qandadiv" -> gets dbSectionLevel >>= sect . (+1)
"abstract" -> blockQuote <$> getBlocks e
"itemizedlist" -> bulletList <$> listitems
"orderedlist" -> orderedList <$> listitems -- TODO list attributes
Expand All @@ -578,6 +581,7 @@ parseBlock (Elem e) =
"article" -> modify (\st -> st{ dbBook = False }) >>
getTitle >> getBlocks e
"book" -> modify (\st -> st{ dbBook = True }) >> getTitle >> getBlocks e
"screen" -> return $ codeBlock $ strContent e -- TODO attrs
"programlisting" -> return $ codeBlock $ strContent e -- TODO attrs
"?xml" -> return mempty
_ -> getBlocks e
Expand Down

0 comments on commit cbfd187

Please sign in to comment.