mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-29 19:05:59 +00:00
T.P.Format: Monoid, Semigroup instance for ExtensionsConfig.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user