From 2ced785e95e0799f3c8a705e828e6522e11a8a98 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Tue, 8 Dec 2009 02:36:16 +0000 Subject: Added optional section numbering in HTML output. This involves a change to the Element data structure, including a section number as well as an id and title for each section. Section numbers are lists of integers; this should allow different numbering schemes to be used in the future. Currently [1,2,3] -> 1.2.3. Resolves Issue #150. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1658 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Writers/Docbook.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Text/Pandoc/Writers/Docbook.hs') diff --git a/src/Text/Pandoc/Writers/Docbook.hs b/src/Text/Pandoc/Writers/Docbook.hs index b4f760e6c..b46bb0eb4 100644 --- a/src/Text/Pandoc/Writers/Docbook.hs +++ b/src/Text/Pandoc/Writers/Docbook.hs @@ -82,7 +82,7 @@ writeDocbook opts (Pandoc (Meta title authors date) blocks) = -- | Convert an Element to Docbook. elementToDocbook :: WriterOptions -> Element -> Doc elementToDocbook opts (Blk block) = blockToDocbook opts block -elementToDocbook opts (Sec _ id' title elements) = +elementToDocbook opts (Sec _ _num id' title elements) = -- Docbook doesn't allow sections with no content, so insert some if needed let elements' = if null elements then [Blk (Para [])] -- cgit v1.2.3