DocBook reader: Skip toc tags.

This commit is contained in:
John MacFarlane 2012-05-10 19:56:08 -07:00
parent dab6a36585
commit 84d213baff

View file

@ -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