aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Citeproc.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2020-10-31 21:30:57 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2020-11-01 10:48:47 -0800
commit01f2d811683ccae5677233c8f5d9067671619e0b (patch)
treec4f5893239d715f8edac66e11167c2b7d1ed9c1a /src/Text/Pandoc/Citeproc.hs
parent2125aea026073ed2321e75e11e0eac91ba36f910 (diff)
downloadpandoc-01f2d811683ccae5677233c8f5d9067671619e0b.tar.gz
Improve deNote.
Diffstat (limited to 'src/Text/Pandoc/Citeproc.hs')
-rw-r--r--src/Text/Pandoc/Citeproc.hs9
1 files changed, 5 insertions, 4 deletions
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,