diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-10-07 22:23:00 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-10-07 22:23:51 -0700 |
commit | 34c61fcad5f0809bbcc3cd82a45e9b6eff110533 (patch) | |
tree | b9741cca2f5a1c40237796773de2b1a1fe0eaef1 /src/Text/Pandoc/App | |
parent | e4ccfeab8c55578fead30233394d531f31a429c3 (diff) | |
download | pandoc-34c61fcad5f0809bbcc3cd82a45e9b6eff110533.tar.gz |
Text.Pandoc.Options: change To/FromJSON instances for...
HTMLMathMethod, CiteMethod, ObfuscationMethod, TrackChanges, WrapOption,
TopLevelDivision, ReferenceLocation, HTMLSlideVariant.
In each case we use lowercase (or hyphenated lowercase) for
constructors to line up more closely with command-line option
values.
This is a breaking change for those who manually decode or encode
JSON for these data types (e.g. for ReaderOptions or WriterOptions).
See #5790.
Diffstat (limited to 'src/Text/Pandoc/App')
-rw-r--r-- | src/Text/Pandoc/App/Opt.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/App/Opt.hs b/src/Text/Pandoc/App/Opt.hs index f714586e4..6610f6186 100644 --- a/src/Text/Pandoc/App/Opt.hs +++ b/src/Text/Pandoc/App/Opt.hs @@ -20,6 +20,7 @@ module Text.Pandoc.App.Opt ( , defaultOpts ) where import Prelude +import Data.Char (isLower) import GHC.Generics import Text.Pandoc.Filter (Filter (..)) import Text.Pandoc.Logging (Verbosity (WARNING)) @@ -201,4 +202,5 @@ defaultOpts = Opt -- using generic deriving caused long compilation times $(deriveJSON defaultOptions{ fieldLabelModifier = - camelCaseToHyphenated . drop 3 } ''Opt) + camelCaseToHyphenated . dropWhile isLower + } ''Opt) |