summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Docbook.hs
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-12-31 01:10:17 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-12-31 01:10:17 +0000
commit9f126c15cf4d0f6c2ab14167e11336d4f5f8783e (patch)
tree416833a563f3be1b9e0bd72e1ec9006150e16943 /src/Text/Pandoc/Writers/Docbook.hs
parentc602ed345959dbeb08533cd9c9c11f0604641c10 (diff)
Removed unneeded writer options; use template variables instead.
Removed writerIncludeAfter, writerIncludeBefore, writerTitlePrefix, writerHeader. Removed corresponding fields of Options structure in pandoc.hs. The options now set template variables (writerVariables) instead. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1684 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc/Writers/Docbook.hs')
-rw-r--r--src/Text/Pandoc/Writers/Docbook.hs39
1 files changed, 20 insertions, 19 deletions
diff --git a/src/Text/Pandoc/Writers/Docbook.hs b/src/Text/Pandoc/Writers/Docbook.hs
index b46bb0eb4..8d1ea30e9 100644
--- a/src/Text/Pandoc/Writers/Docbook.hs
+++ b/src/Text/Pandoc/Writers/Docbook.hs
@@ -59,25 +59,26 @@ authorToDocbook name = inTagsIndented "author" $
-- | Convert Pandoc document to string in Docbook format.
writeDocbook :: WriterOptions -> Pandoc -> String
writeDocbook opts (Pandoc (Meta title authors date) blocks) =
- let head' = if writerStandalone opts
- then text (writerHeader opts)
- else empty
- meta = if writerStandalone opts
- then inTagsIndented "articleinfo" $
- (inTagsSimple "title" (wrap opts title)) $$
- (vcat (map authorToDocbook authors)) $$
- (inTagsSimple "date" (text $ escapeStringForXML date))
- else empty
- elements = hierarchicalize blocks
- before = writerIncludeBefore opts
- after = writerIncludeAfter opts
- body = (if null before then empty else text before) $$
- vcat (map (elementToDocbook opts) elements) $$
- (if null after then empty else text after)
- body' = if writerStandalone opts
- then inTagsIndented "article" (meta $$ body)
- else body
- in render $ head' $$ body' $$ text ""
+ "" -- TODO
+-- let head' = if writerStandalone opts
+-- then text (writerHeader opts)
+-- else empty
+-- meta = if writerStandalone opts
+-- then inTagsIndented "articleinfo" $
+-- (inTagsSimple "title" (wrap opts title)) $$
+-- (vcat (map authorToDocbook authors)) $$
+-- (inTagsSimple "date" (text $ escapeStringForXML date))
+-- else empty
+-- elements = hierarchicalize blocks
+-- before = writerIncludeBefore opts
+-- after = writerIncludeAfter opts
+-- body = (if null before then empty else text before) $$
+-- vcat (map (elementToDocbook opts) elements) $$
+-- (if null after then empty else text after)
+-- body' = if writerStandalone opts
+-- then inTagsIndented "article" (meta $$ body)
+-- else body
+-- in render $ head' $$ body' $$ text ""
-- | Convert an Element to Docbook.
elementToDocbook :: WriterOptions -> Element -> Doc