aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-10-06 16:53:59 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-10-06 16:55:12 -0700
commitcf1703396c626861fb1904bf5159e04d1ecc79b8 (patch)
treef8be9842ee49a2c80d35a54f4818074aea99d9ba /src
parentceeb5652037f787a15a67c9dbdd26267805982c9 (diff)
downloadpandoc-cf1703396c626861fb1904bf5159e04d1ecc79b8.tar.gz
Text.Pandoc.App.Opt: Change optShiftHeadingLevel to optShiftHeadingLevelBy...
to match the option.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/App.hs2
-rw-r--r--src/Text/Pandoc/App/CommandLineOptions.hs2
-rw-r--r--src/Text/Pandoc/App/Opt.hs4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs
index b96fd5306..47fb155eb 100644
--- a/src/Text/Pandoc/App.hs
+++ b/src/Text/Pandoc/App.hs
@@ -232,7 +232,7 @@ convertWithOpts opts = do
let transforms = (case optBaseHeaderLevel opts of
x | x > 1 -> (headerShift (x - 1) :)
| otherwise -> id) .
- (case optShiftHeadingLevel opts of
+ (case optShiftHeadingLevelBy opts of
0 -> id
x -> (headerShift x :)) .
(if optStripEmptyParagraphs opts
diff --git a/src/Text/Pandoc/App/CommandLineOptions.hs b/src/Text/Pandoc/App/CommandLineOptions.hs
index abb73ec92..43080c8c6 100644
--- a/src/Text/Pandoc/App/CommandLineOptions.hs
+++ b/src/Text/Pandoc/App/CommandLineOptions.hs
@@ -441,7 +441,7 @@ options =
(\arg opt ->
case safeRead arg of
Just t ->
- return opt{ optShiftHeadingLevel = t }
+ return opt{ optShiftHeadingLevelBy = t }
_ -> E.throwIO $ PandocOptionError
"shift-heading-level-by takes an integer argument")
"NUMBER")
diff --git a/src/Text/Pandoc/App/Opt.hs b/src/Text/Pandoc/App/Opt.hs
index 86ef60d2b..bbcc65395 100644
--- a/src/Text/Pandoc/App/Opt.hs
+++ b/src/Text/Pandoc/App/Opt.hs
@@ -50,7 +50,7 @@ data Opt = Opt
, optReader :: Maybe String -- ^ Reader format
, optWriter :: Maybe String -- ^ Writer format
, optTableOfContents :: Bool -- ^ Include table of contents
- , optShiftHeadingLevel :: Int -- ^ Shift heading level by
+ , optShiftHeadingLevelBy :: Int -- ^ Shift heading level by
, optBaseHeaderLevel :: Int -- ^ Base header level
, optTemplate :: Maybe FilePath -- ^ Custom template
, optVariables :: [(String,String)] -- ^ Template variables to set
@@ -125,7 +125,7 @@ defaultOpts = Opt
, optReader = Nothing
, optWriter = Nothing
, optTableOfContents = False
- , optShiftHeadingLevel = 0
+ , optShiftHeadingLevelBy = 0
, optBaseHeaderLevel = 1
, optTemplate = Nothing
, optVariables = []