aboutsummaryrefslogtreecommitdiff
path: root/pandoc.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-01-05 12:03:05 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-01-05 12:03:05 -0800
commitc45ae571ccee3cd0e6aa11b3b43e8eaf6315386b (patch)
tree2481a6fb9c98a08f715300b34f5bfab1a24a579f /pandoc.hs
parent2e0894554ce591488b7e0aebfaecf1fd7dc83c10 (diff)
downloadpandoc-c45ae571ccee3cd0e6aa11b3b43e8eaf6315386b.tar.gz
Changed --toc-level to --toc-depth.
Diffstat (limited to 'pandoc.hs')
-rw-r--r--pandoc.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/pandoc.hs b/pandoc.hs
index 9fca0414b..de6758be8 100644
--- a/pandoc.hs
+++ b/pandoc.hs
@@ -115,7 +115,7 @@ data Opt = Opt
, optEpubMetadata :: String -- ^ EPUB metadata
, optEpubFonts :: [FilePath] -- ^ EPUB fonts to embed
, optEpubChapterLevel :: Int -- ^ Header level at which to split chapters
- , optTOCLevel :: Int -- ^ Number of levels to include in TOC
+ , optTOCDepth :: Int -- ^ Number of levels to include in TOC
, optDumpArgs :: Bool -- ^ Output command-line arguments
, optIgnoreArgs :: Bool -- ^ Ignore command-line arguments
, optReferenceLinks :: Bool -- ^ Use reference links in writing markdown, rst
@@ -169,7 +169,7 @@ defaultOpts = Opt
, optEpubMetadata = ""
, optEpubFonts = []
, optEpubChapterLevel = 1
- , optTOCLevel = 3
+ , optTOCDepth = 3
, optDumpArgs = False
, optIgnoreArgs = False
, optReferenceLinks = False
@@ -340,12 +340,12 @@ options =
(\opt -> return opt { optTableOfContents = True }))
"" -- "Include table of contents"
- , Option "" ["toc-level"]
+ , Option "" ["toc-depth"]
(ReqArg
(\arg opt -> do
case safeRead arg of
Just t | t >= 1 && t <= 6 ->
- return opt { optTOCLevel = t,
+ return opt { optTOCDepth = t,
optTableOfContents = True }
_ -> err 57 $
"TOC level must be a number between 1 and 6")
@@ -831,7 +831,7 @@ main = do
, optEpubMetadata = epubMetadata
, optEpubFonts = epubFonts
, optEpubChapterLevel = epubChapterLevel
- , optTOCLevel = epubTOCLevel
+ , optTOCDepth = epubTOCDepth
, optDumpArgs = dumpArgs
, optIgnoreArgs = ignoreArgs
, optReferenceLinks = referenceLinks
@@ -1022,7 +1022,7 @@ main = do
writerEpubStylesheet = epubStylesheet,
writerEpubFonts = epubFonts,
writerEpubChapterLevel = epubChapterLevel,
- writerTOCLevel = epubTOCLevel,
+ writerTOCDepth = epubTOCDepth,
writerReferenceODT = referenceODT,
writerReferenceDocx = referenceDocx
}