aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/App
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-10-07 22:23:00 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-10-07 22:23:51 -0700
commit34c61fcad5f0809bbcc3cd82a45e9b6eff110533 (patch)
treeb9741cca2f5a1c40237796773de2b1a1fe0eaef1 /src/Text/Pandoc/App
parente4ccfeab8c55578fead30233394d531f31a429c3 (diff)
downloadpandoc-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.hs4
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)