git.iko.soy/typeable/pandoc
on master help sign in
DocBook reader: Support 'optional' tag.
bff02ddJohn MacFarlane
src/Text/Pandoc/Readers/DocBook.hs+5−2
@@ -90,7 +90,7 @@ List of all DocBook tags, with [x] indicating implemented,
90[ ] collabname - The name of a collaborator
90[ ] collabname - The name of a collaborator
91[ ] colophon - Text at the back of a book describing facts about its production
91[ ] colophon - Text at the back of a book describing facts about its production
92[x] colspec - Specifications for a column in a table
92[x] colspec - Specifications for a column in a table
93−[ ] command - The name of an executable program or other software command
93+[x] command - The name of an executable program or other software command
94[x] computeroutput - Data, generally text, displayed or presented by a computer
94[x] computeroutput - Data, generally text, displayed or presented by a computer
95[ ] confdates - The dates of a conference for which a document was written
95[ ] confdates - The dates of a conference for which a document was written
96[ ] confgroup - A wrapper for document meta-information about a conference
96[ ] confgroup - A wrapper for document meta-information about a conference
@@ -262,7 +262,7 @@ List of all DocBook tags, with [x] indicating implemented,
262[ ] ooexception - An exception in an object-oriented programming language
262[ ] ooexception - An exception in an object-oriented programming language
263[ ] oointerface - An interface in an object-oriented programming language
263[ ] oointerface - An interface in an object-oriented programming language
264[x] option - An option for a software command
264[x] option - An option for a software command
265−[ ] optional - Optional information
265+[x] optional - Optional information
266[x] orderedlist - A list in which each entry is marked with a sequentially
266[x] orderedlist - A list in which each entry is marked with a sequentially
267 incremented label
267 incremented label
268[ ] orgdiv - A division of an organization
268[ ] orgdiv - A division of an organization
@@ -781,8 +781,11 @@ parseInline (Elem e) =
781 "filename" -> return $ codeWith ("",["filename"],[]) $ strContent e -- TODO attrs
781 "filename" -> return $ codeWith ("",["filename"],[]) $ strContent e -- TODO attrs
782 "literal" -> return $ code $ strContent e -- TODO attrs
782 "literal" -> return $ code $ strContent e -- TODO attrs
783 "option" -> return $ codeWith ("",["option"],[]) $ strContent e -- TODO attrs
783 "option" -> return $ codeWith ("",["option"],[]) $ strContent e -- TODO attrs
784+ "optional" -> do x <- getInlines e
785+ return $ str "[" <> x <> str "]"
784 "markup" -> return $ code $ strContent e -- TODO attrs
786 "markup" -> return $ code $ strContent e -- TODO attrs
785 "wordasword" -> emph <$> innerInlines
787 "wordasword" -> emph <$> innerInlines
788+ "command" -> return $ codeWith ("",["command"],[]) $ strContent e
786 "varname" -> return $ codeWith ("",["varname"],[]) $ strContent e
789 "varname" -> return $ codeWith ("",["varname"],[]) $ strContent e
787 "function" -> return $ codeWith ("",["function"],[]) $ strContent e
790 "function" -> return $ codeWith ("",["function"],[]) $ strContent e
788 "type" -> return $ codeWith ("",["type"],[]) $ strContent e
791 "type" -> return $ codeWith ("",["type"],[]) $ strContent e