git.iko.soy/typeable/pandoc
on master help sign in
Text.Pandoc.App.Opt: Change optShiftHeadingLevel to optShiftHeadingLevelBy...

to match the option.

commitcf1703396c626861fb1904bf5159e04d1ecc79b8 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 6 Oct 2019, 16:53 (7 years ago) parentceeb565
3 files changed+4−4
src/Text/Pandoc/App.hs+1−1 src/Text/Pandoc/App/CommandLineOptions.hs+1−1 src/Text/Pandoc/App/Opt.hs+2−2
src/Text/Pandoc/App.hs+1−1
@@ -232,7 +232,7 @@ convertWithOpts opts = do
232232 let transforms = (case optBaseHeaderLevel opts of
233233 x | x > 1 -> (headerShift (x - 1) :)
234234 | otherwise -> id) .
235− (case optShiftHeadingLevel opts of
235+ (case optShiftHeadingLevelBy opts of
236236 0 -> id
237237 x -> (headerShift x :)) .
238238 (if optStripEmptyParagraphs opts
src/Text/Pandoc/App/CommandLineOptions.hs+1−1
@@ -441,7 +441,7 @@ options =
441441 (\arg opt ->
442442 case safeRead arg of
443443 Just t ->
444− return opt{ optShiftHeadingLevel = t }
444+ return opt{ optShiftHeadingLevelBy = t }
445445 _ -> E.throwIO $ PandocOptionError
446446 "shift-heading-level-by takes an integer argument")
447447 "NUMBER")
src/Text/Pandoc/App/Opt.hs+2−2
@@ -50,7 +50,7 @@ data Opt = Opt
5050 , optReader :: Maybe String -- ^ Reader format
5151 , optWriter :: Maybe String -- ^ Writer format
5252 , optTableOfContents :: Bool -- ^ Include table of contents
53− , optShiftHeadingLevel :: Int -- ^ Shift heading level by
53+ , optShiftHeadingLevelBy :: Int -- ^ Shift heading level by
5454 , optBaseHeaderLevel :: Int -- ^ Base header level
5555 , optTemplate :: Maybe FilePath -- ^ Custom template
5656 , optVariables :: [(String,String)] -- ^ Template variables to set
@@ -125,7 +125,7 @@ defaultOpts = Opt
125125 , optReader = Nothing
126126 , optWriter = Nothing
127127 , optTableOfContents = False
128− , optShiftHeadingLevel = 0
128+ , optShiftHeadingLevelBy = 0
129129 , optBaseHeaderLevel = 1
130130 , optTemplate = Nothing
131131 , optVariables = []