aboutsummaryrefslogtreecommitdiff
path: root/src/pandoc.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2010-07-15 19:01:00 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2010-07-15 22:26:45 -0700
commit9be9bccfcfc2c46459b3da963bc59a37f841fe8a (patch)
tree1ecfb499923d950426d8ca1cc12e1c28291ae235 /src/pandoc.hs
parent57a91f3b6add303ef70aa29a14a8c67123ec7c0f (diff)
downloadpandoc-9be9bccfcfc2c46459b3da963bc59a37f841fe8a.tar.gz
Added --section-divs option.
+ Header identifiers now get attached to the headers, unless --section-divs is specified, in which case they are added to enclosing divs. By default, the divs are not added. + Resolves Issue #230, #239.
Diffstat (limited to 'src/pandoc.hs')
-rw-r--r--src/pandoc.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pandoc.hs b/src/pandoc.hs
index 9546d6026..cd4d65aa5 100644
--- a/src/pandoc.hs
+++ b/src/pandoc.hs
@@ -142,6 +142,7 @@ data Opt = Opt
, optVariables :: [(String,String)] -- ^ Template variables to set
, optOutputFile :: String -- ^ Name of output file
, optNumberSections :: Bool -- ^ Number sections in LaTeX
+ , optSectionDivs :: Bool -- ^ Put sections in div tags in HTML
, optIncremental :: Bool -- ^ Use incremental lists in Slidy/S5
, optXeTeX :: Bool -- ^ Format latex for xetex
, optSmart :: Bool -- ^ Use smart typography
@@ -182,6 +183,7 @@ defaultOpts = Opt
, optVariables = []
, optOutputFile = "-" -- "-" means stdout
, optNumberSections = False
+ , optSectionDivs = False
, optIncremental = False
, optXeTeX = False
, optSmart = False
@@ -325,6 +327,11 @@ options =
(\opt -> return opt { optNumberSections = True }))
"" -- "Number sections in LaTeX"
+ , Option "" ["section-divs"]
+ (NoArg
+ (\opt -> return opt { optSectionDivs = True }))
+ "" -- "Put sections in div tags in HTML"
+
, Option "" ["no-wrap"]
(NoArg
(\opt -> return opt { optWrapText = False }))
@@ -643,6 +650,7 @@ main = do
, optTemplate = template
, optOutputFile = outputFile
, optNumberSections = numberSections
+ , optSectionDivs = sectionDivs
, optIncremental = incremental
, optXeTeX = xetex
, optSmart = smart
@@ -782,6 +790,7 @@ main = do
writerXeTeX = xetex,
writerIgnoreNotes = False,
writerNumberSections = numberSections,
+ writerSectionDivs = sectionDivs,
writerStrictMarkdown = strict,
writerReferenceLinks = referenceLinks,
writerWrapText = wrap,