aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Krewinkel <[email protected]>2025-08-10 10:51:14 +0200
committerAlbert Krewinkel <[email protected]>2025-08-10 10:53:10 +0200
commit550fe44f950543715f591dc6bb8987747dd1d44d (patch)
treea261a065680b56187ce4336df56369260a806ed9
parent816ca8480dd0887f39294f91a38e66bda33bbd2d (diff)
T.P.Writers.Shared: amend docs of `lookupMeta...` functions.
Add notes to the Haddock docs that certain meta values lead to empty return values. Closes: #10634
-rw-r--r--src/Text/Pandoc/Writers/Shared.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/Shared.hs b/src/Text/Pandoc/Writers/Shared.hs
index a24be9a13..aff1520f1 100644
--- a/src/Text/Pandoc/Writers/Shared.hs
+++ b/src/Text/Pandoc/Writers/Shared.hs
@@ -568,6 +568,8 @@ lookupMetaBool key meta =
-- | Retrieve the metadata value for a given @key@
-- and extract blocks.
+--
+-- Note that an empty list is returned for maps, lists, and booleans.
lookupMetaBlocks :: Text -> Meta -> [Block]
lookupMetaBlocks key meta =
case lookupMeta key meta of
@@ -578,6 +580,8 @@ lookupMetaBlocks key meta =
-- | Retrieve the metadata value for a given @key@
-- and extract inlines.
+--
+-- Note that an empty list is returned for maps and lists.
lookupMetaInlines :: Text -> Meta -> [Inline]
lookupMetaInlines key meta =
case lookupMeta key meta of
@@ -589,6 +593,8 @@ lookupMetaInlines key meta =
-- | Retrieve the metadata value for a given @key@
-- and convert to String.
+--
+-- Note that an empty list is returned for maps, lists, and booleans.
lookupMetaString :: Text -> Meta -> Text
lookupMetaString key meta =
case lookupMeta key meta of