aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-07-07 19:04:10 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-07-07 19:04:10 +0000
commitf2b16c2065ae5b87615a07ed8b3879f980c26464 (patch)
tree875effa870e571c01e4254305259535a29859c46 /src/Text/Pandoc/Writers
parentfdf31cd23d85e9615c891edadb726137150c5384 (diff)
downloadpandoc-f2b16c2065ae5b87615a07ed8b3879f980c26464.tar.gz
+ 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
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/Docbook.hs20
1 files changed, 0 insertions, 20 deletions
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 <author> section
authorToDocbook :: [Char] -> Doc
authorToDocbook name = inTagsIndented "author" $