From 34c61fcad5f0809bbcc3cd82a45e9b6eff110533 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 7 Oct 2019 22:23:00 -0700 Subject: 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. --- src/Text/Pandoc/App/Opt.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc/App') 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) -- cgit v1.2.3