git.iko.soy/typeable/pandoc
on master help sign in
Merge pull request #1797 from bos/master

DocBook reader: add support for "classname", document and test "type"

commit2b1ddc26801abd94fcf5a3cdf312cbf4156843f4 authorJohn MacFarlane <jgm@berkeley.edu> dateMon 8 Dec 2014, 23:41 (12 years ago) parent626cefe2150903
3 files changed+7−2
src/Text/Pandoc/Readers/DocBook.hs+3−2 tests/docbook-reader.docbook+3 tests/docbook-reader.native+1
src/Text/Pandoc/Readers/DocBook.hs+3−2
@@ -81,7 +81,7 @@ List of all DocBook tags, with [x] indicating implemented,
8181[ ] citerefentry - A citation to a reference page
8282[ ] citetitle - The title of a cited work
8383[ ] city - The name of a city in an address
84−[ ] classname - The name of a class, in the object-oriented programming sense
84+[x] classname - The name of a class, in the object-oriented programming sense
8585[ ] classsynopsis - The syntax summary for a class definition
8686[ ] classsynopsisinfo - Information supplementing the contents of
8787 a ClassSynopsis
@@ -471,7 +471,7 @@ List of all DocBook tags, with [x] indicating implemented,
471471[ ] token - A unit of information
472472[x] tr - A row in an HTML table
473473[ ] trademark - A trademark
474−[ ] type - The classification of a value
474+[x] type - The classification of a value
475475[x] ulink - A link that addresses its target by means of a URL
476476 (Uniform Resource Locator)
477477[x] uri - A Uniform Resource Identifier
@@ -903,6 +903,7 @@ parseInline (Elem e) =
903903 else doubleQuoted contents
904904 "simplelist" -> simpleList
905905 "segmentedlist" -> segmentedList
906+ "classname" -> codeWithLang
906907 "code" -> codeWithLang
907908 "filename" -> codeWithLang
908909 "literal" -> codeWithLang
tests/docbook-reader.docbook+3
@@ -709,6 +709,9 @@ These should not be escaped: \$ \\ \&gt; \[ \{
709709 <literal>\</literal>, <literal>\$</literal>,
710710 <literal>&lt;html&gt;</literal>.
711711 </para>
712+ <para>
713+ More code: <classname>Class</classname> and <type>Type</type>
714+ </para>
712715 <para>
713716 <emphasis role="strikethrough">This is
714717 <emphasis>strikeout</emphasis>.</emphasis>
tests/docbook-reader.native+1
@@ -185,6 +185,7 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Spa
185185,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]]
186186,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."]
187187,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",Space,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",Space,Code ("",[],[]) "<html>",Str "."]
188+,Para [Str "More",Space,Str "code:",Space,Code ("",[],[]) "Class",Space,Str "and",Space,Code ("",[],[]) "Type"]
188189,Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "strikeout"],Str "."]]
189190,Para [Str "Superscripts:",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Superscript [Emph [Str "hello"]],Space,Str "a",Superscript [Str "hello\160there"],Str "."]
190191,Para [Str "Subscripts:",Space,Str "H",Subscript [Str "2"],Str "O,",Space,Str "H",Subscript [Str "23"],Str "O,",Space,Str "H",Subscript [Str "many\160of\160them"],Str "O."]