mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-26 10:16:32 +00:00
Biblio: Workaround broken toCapital in citeproc-0.3.4.
This commit is contained in:
@@ -92,8 +92,16 @@ mvPunct (Space : x : ys) | isNote x = x : ys
|
||||
mvPunct xs = xs
|
||||
|
||||
sanitize :: [Inline] -> [Inline]
|
||||
sanitize xs | endWithPunct xs = toCapital xs
|
||||
| otherwise = toCapital (xs ++ [Str "."])
|
||||
sanitize xs | endWithPunct xs = toCapital' xs
|
||||
| otherwise = toCapital' (xs ++ [Str "."])
|
||||
|
||||
-- NOTE: toCapital' works around a bug in toCapital from citeproc-hs 0.3.4.
|
||||
-- When citeproc-hs is fixed, we can return to using toCapital in sanitize.
|
||||
toCapital' :: [Inline] -> [Inline]
|
||||
toCapital' [] = []
|
||||
toCapital' xs = case toCapital xs of
|
||||
[] -> xs
|
||||
ys -> ys
|
||||
|
||||
deNote :: [Block] -> [Block]
|
||||
deNote = topDown go
|
||||
|
||||
Reference in New Issue
Block a user