summaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Format.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Format.hs b/src/Text/Pandoc/Format.hs
index afd483577..c2065afb1 100644
--- a/src/Text/Pandoc/Format.hs
+++ b/src/Text/Pandoc/Format.hs
@@ -81,6 +81,14 @@ getExtensionsConfig fmt = ExtensionsConfig
, extsSupported = getAllExtensions fmt
}
+instance Semigroup ExtensionsConfig where
+ ExtensionsConfig x1 y1 <> ExtensionsConfig x2 y2 =
+ ExtensionsConfig (x1 <> x2) (y1 <> y2)
+
+instance Monoid ExtensionsConfig where
+ mappend = (<>)
+ mempty = ExtensionsConfig mempty mempty
+
-- | Apply the extension changes in the format spec to the extensions
-- given in the format's extensions configuration. Throws an error in
-- case of an unknown or unsupported extension.