diff options
author | John MacFarlane <jgm@berkeley.edu> | 2020-10-31 21:30:57 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2020-11-01 10:48:47 -0800 |
commit | 01f2d811683ccae5677233c8f5d9067671619e0b (patch) | |
tree | c4f5893239d715f8edac66e11167c2b7d1ed9c1a /src | |
parent | 2125aea026073ed2321e75e11e0eac91ba36f910 (diff) | |
download | pandoc-01f2d811683ccae5677233c8f5d9067671619e0b.tar.gz |
Improve deNote.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Citeproc.hs | 9 |
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, |