From 6c934abe6dd6022dbe15e2742dc030ccabd72dff Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 9 Feb 2023 20:02:39 -0800 Subject: Citeproc: Fix bug in metaValueToReference. This bug caused us to get some repeated content when converting MetaBlock to Inlines. Closes #8611. --- src/Text/Pandoc/Citeproc/MetaValue.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Citeproc/MetaValue.hs b/src/Text/Pandoc/Citeproc/MetaValue.hs index ce7b1285c..d049674d6 100644 --- a/src/Text/Pandoc/Citeproc/MetaValue.hs +++ b/src/Text/Pandoc/Citeproc/MetaValue.hs @@ -9,8 +9,7 @@ where import Citeproc.Types import Text.Pandoc.Definition import Text.Pandoc.Builder as B -import Text.Pandoc.Walk (query) -import Text.Pandoc.Shared (stringify) +import Text.Pandoc.Shared (stringify, blocksToInlines') import Data.Maybe import Safe import qualified Data.Set as Set @@ -126,7 +125,7 @@ metaValueToVal k v case v of MetaString t -> TextVal t MetaInlines ils -> FancyVal (B.fromList ils) - MetaBlocks bs -> FancyVal (B.fromList $ query id bs) + MetaBlocks bs -> FancyVal (blocksToInlines' bs) MetaBool b -> TextVal (if b then "true" else "false") MetaList _ -> TextVal mempty MetaMap _ -> TextVal mempty -- cgit v1.2.3