From f2b16c2065ae5b87615a07ed8b3879f980c26464 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sat, 7 Jul 2007 19:04:10 +0000 Subject: + Introduced writerIgnoreNotes option in WriterOptions. This is needed for processing header blocks for a table of contents, since notes on headers should not appear in the TOC. Set default in Main.hs. + Moved Element, headerAtLeast, and hierarchicalize from Docbook writer to Text.Pandoc.Shared. This is because HTML writer now uses these in constructing a table of contents. git-svn-id: https://pandoc.googlecode.com/svn/trunk@633 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Writers/Docbook.hs | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'src/Text/Pandoc/Writers') diff --git a/src/Text/Pandoc/Writers/Docbook.hs b/src/Text/Pandoc/Writers/Docbook.hs index 2fa1e8b40..93f091460 100644 --- a/src/Text/Pandoc/Writers/Docbook.hs +++ b/src/Text/Pandoc/Writers/Docbook.hs @@ -74,26 +74,6 @@ inTagsIndented tagType = inTags True tagType [] -- Docbook writer -- --- | Data structure for defining hierarchical Pandoc documents -data Element = Blk Block - | Sec [Inline] [Element] deriving (Eq, Read, Show) - --- | Returns true on Header block with level at least 'level' -headerAtLeast :: Int -> Block -> Bool -headerAtLeast level (Header x _) = x <= level -headerAtLeast level _ = False - --- | Convert list of Pandoc blocks into list of Elements (hierarchical) -hierarchicalize :: [Block] -> [Element] -hierarchicalize [] = [] -hierarchicalize (block:rest) = - case block of - (Header level title) -> let (thisSection, rest') = break (headerAtLeast - level) rest in - (Sec title (hierarchicalize thisSection)): - (hierarchicalize rest') - x -> (Blk x):(hierarchicalize rest) - -- | Convert list of authors to a docbook section authorToDocbook :: [Char] -> Doc authorToDocbook name = inTagsIndented "author" $ -- cgit v1.2.3