diff options
Diffstat (limited to 'src/Text/Pandoc/Citeproc/BibTeX.hs')
| -rw-r--r-- | src/Text/Pandoc/Citeproc/BibTeX.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Citeproc/BibTeX.hs b/src/Text/Pandoc/Citeproc/BibTeX.hs index 7da39fa42..7276499e4 100644 --- a/src/Text/Pandoc/Citeproc/BibTeX.hs +++ b/src/Text/Pandoc/Citeproc/BibTeX.hs @@ -1100,8 +1100,12 @@ getLiteralList' f = do splitByAnd :: [Inline] -> [Inlines] splitByAnd = - map B.fromList . splitWhen (== Str " and ") . foldr splitOnAnd [] + map B.fromList . splitWhen (== Str " and ") . foldr splitOnAnd [] . + normalize . map softBreakToSpace where + normalize = B.toList . mconcat . map B.singleton + softBreakToSpace SoftBreak = Str " " + softBreakToSpace x = x splitOnAnd (Str t) = (intersperse (Str " and ") (map Str (T.splitOn " and " t)) ++) splitOnAnd x = (x :) |
