mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-19 02:22:09 +08:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user