From 01f2d811683ccae5677233c8f5d9067671619e0b Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 31 Oct 2020 21:30:57 -0700 Subject: Improve deNote. --- src/Text/Pandoc/Citeproc.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Citeproc.hs b/src/Text/Pandoc/Citeproc.hs index 57f676115..75cbe6991 100644 --- a/src/Text/Pandoc/Citeproc.hs +++ b/src/Text/Pandoc/Citeproc.hs @@ -527,11 +527,12 @@ capitalizeNoteCitation x = x deNote :: Inline -> Inline deNote (Note bs) = Note $ walk go bs where - go (Note bs') - = Span ("",[],[]) (Space : Str "(" : - (removeFinalPeriod - (blocksToInlines bs')) ++ [Str ")"]) + go (Cite cs ils) = Cite cs (concatMap removeNote ils) go x = x + removeNote (Note bs') + = Space : Str "(" : (removeFinalPeriod + (blocksToInlines bs')) ++ [Str ")"] + removeNote x = [x] deNote x = x -- Note: we can't use dropTextWhileEnd indiscriminately, -- cgit v1.2.3