Text.Pandoc.App.Opt: Change optShiftHeadingLevel to optShiftHeadingLevelBy...
to match the option.
This commit is contained in:
parent
ceeb565203
commit
cf1703396c
3 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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 = []
|
||||
|
|
Loading…
Add table
Reference in a new issue