git.iko.soy/typeable/pandoc
on master help sign in
Text.Pandoc.App.Opt: Change optShiftHeadingLevel to optShiftHeadingLevelBy...
cf17033John MacFarlane
src/Text/Pandoc/App.hs+1−1
@@ -232,7 +232,7 @@ convertWithOpts opts = do
232 let transforms = (case optBaseHeaderLevel opts of
232 let transforms = (case optBaseHeaderLevel opts of
233 x | x > 1 -> (headerShift (x - 1) :)
233 x | x > 1 -> (headerShift (x - 1) :)
234 | otherwise -> id) .
234 | otherwise -> id) .
235− (case optShiftHeadingLevel opts of
235+ (case optShiftHeadingLevelBy opts of
236 0 -> id
236 0 -> id
237 x -> (headerShift x :)) .
237 x -> (headerShift x :)) .
238 (if optStripEmptyParagraphs opts
238 (if optStripEmptyParagraphs opts
src/Text/Pandoc/App/CommandLineOptions.hs+1−1
@@ -441,7 +441,7 @@ options =
441 (\arg opt ->
441 (\arg opt ->
442 case safeRead arg of
442 case safeRead arg of
443 Just t ->
443 Just t ->
444− return opt{ optShiftHeadingLevel = t }
444+ return opt{ optShiftHeadingLevelBy = t }
445 _ -> E.throwIO $ PandocOptionError
445 _ -> E.throwIO $ PandocOptionError
446 "shift-heading-level-by takes an integer argument")
446 "shift-heading-level-by takes an integer argument")
447 "NUMBER")
447 "NUMBER")
src/Text/Pandoc/App/Opt.hs+2−2
@@ -50,7 +50,7 @@ data Opt = Opt
50 , optReader :: Maybe String -- ^ Reader format
50 , optReader :: Maybe String -- ^ Reader format
51 , optWriter :: Maybe String -- ^ Writer format
51 , optWriter :: Maybe String -- ^ Writer format
52 , optTableOfContents :: Bool -- ^ Include table of contents
52 , optTableOfContents :: Bool -- ^ Include table of contents
53− , optShiftHeadingLevel :: Int -- ^ Shift heading level by
53+ , optShiftHeadingLevelBy :: Int -- ^ Shift heading level by
54 , optBaseHeaderLevel :: Int -- ^ Base header level
54 , optBaseHeaderLevel :: Int -- ^ Base header level
55 , optTemplate :: Maybe FilePath -- ^ Custom template
55 , optTemplate :: Maybe FilePath -- ^ Custom template
56 , optVariables :: [(String,String)] -- ^ Template variables to set
56 , optVariables :: [(String,String)] -- ^ Template variables to set
@@ -125,7 +125,7 @@ defaultOpts = Opt
125 , optReader = Nothing
125 , optReader = Nothing
126 , optWriter = Nothing
126 , optWriter = Nothing
127 , optTableOfContents = False
127 , optTableOfContents = False
128− , optShiftHeadingLevel = 0
128+ , optShiftHeadingLevelBy = 0
129 , optBaseHeaderLevel = 1
129 , optBaseHeaderLevel = 1
130 , optTemplate = Nothing
130 , optTemplate = Nothing
131 , optVariables = []
131 , optVariables = []