git.iko.soy/typeable/pandoc
on master help sign in
Improve deNote.
commit01f2d811683ccae5677233c8f5d9067671619e0b authorJohn MacFarlane <jgm@berkeley.edu> dateSat 31 Oct 2020, 21:30 (6 years ago) parent2125aea
1 file changed+5−4
src/Text/Pandoc/Citeproc.hs+5−4
src/Text/Pandoc/Citeproc.hs+5−4
@@ -527,11 +527,12 @@ capitalizeNoteCitation x = x
527527deNote :: Inline -> Inline
528528deNote (Note bs) = Note $ walk go bs
529529 where
530− go (Note bs')
531− = Span ("",[],[]) (Space : Str "(" :
532− (removeFinalPeriod
533− (blocksToInlines bs')) ++ [Str ")"])
530+ go (Cite cs ils) = Cite cs (concatMap removeNote ils)
534531 go x = x
532+ removeNote (Note bs')
533+ = Space : Str "(" : (removeFinalPeriod
534+ (blocksToInlines bs')) ++ [Str ")"]
535+ removeNote x = [x]
535536deNote x = x
536537
537538-- Note: we can't use dropTextWhileEnd indiscriminately,