diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2012-05-10 19:56:08 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2012-05-10 19:56:08 -0700 |
commit | 84d213baff79c44b0960b9b9a64b232a42abc97a (patch) | |
tree | ffff98950945616b46d38880d23c5c6e1a65b57a /src | |
parent | dab6a36585fc7e9ef1e8f1bc2789fa91f66b5d43 (diff) | |
download | pandoc-84d213baff79c44b0960b9b9a64b232a42abc97a.tar.gz |
DocBook reader: Skip toc tags.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/DocBook.hs | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs index b323c11cd..9ccfe41a8 100644 --- a/src/Text/Pandoc/Readers/DocBook.hs +++ b/src/Text/Pandoc/Readers/DocBook.hs @@ -447,23 +447,23 @@ List of all DocBook tags, with [x] indicating implemented, [x] title - The text of the title of a section of a document or of a formal block-level element [x] titleabbrev - The abbreviation of a Title -[ ] toc - A table of contents -[ ] tocback - An entry in a table of contents for a back matter component -[ ] tocchap - An entry in a table of contents for a component in the body of +[x] toc - A table of contents +[x] tocback - An entry in a table of contents for a back matter component +[x] tocchap - An entry in a table of contents for a component in the body of a document -[ ] tocentry - A component title in a table of contents -[ ] tocfront - An entry in a table of contents for a front matter component -[ ] toclevel1 - A top-level entry within a table of contents entry for a +[x] tocentry - A component title in a table of contents +[x] tocfront - An entry in a table of contents for a front matter component +[x] toclevel1 - A top-level entry within a table of contents entry for a chapter-like component -[ ] toclevel2 - A second-level entry within a table of contents entry for a +[x] toclevel2 - A second-level entry within a table of contents entry for a chapter-like component -[ ] toclevel3 - A third-level entry within a table of contents entry for a +[x] toclevel3 - A third-level entry within a table of contents entry for a chapter-like component -[ ] toclevel4 - A fourth-level entry within a table of contents entry for a +[x] toclevel4 - A fourth-level entry within a table of contents entry for a chapter-like component -[ ] toclevel5 - A fifth-level entry within a table of contents entry for a +[x] toclevel5 - A fifth-level entry within a table of contents entry for a chapter-like component -[ ] tocpart - An entry in a table of contents for a part of a book +[x] tocpart - An entry in a table of contents for a part of a book [ ] token - A unit of information [x] tr - A row in an HTML table [ ] trademark - A trademark @@ -584,6 +584,7 @@ parseBlock (Text (CData _ s _)) = if all isSpace s parseBlock (CRef x) = return $ plain $ str $ map toUpper x parseBlock (Elem e) = case qName (elName e) of + "toc" -> return mempty -- skip TOC, since in pandoc it's autogenerated "para" -> para <$> getInlines e "simpara" -> para <$> getInlines e "ackno" -> para <$> getInlines e |