LaTeX reader: use combining characters when needed for accents.

For example, there is no unicode code point corresponding to
\"{X}, so we use a combining accent.
This commit is contained in:
John MacFarlane
2018-08-17 22:11:31 -07:00
parent 4ec02053bb
commit 159863e8da
+4 -1
View File
@@ -1073,7 +1073,10 @@ accent :: PandocMonad m => Char -> (Char -> String) -> LP m Inlines
accent c f = try $ do
ils <- tok
case toList ils of
(Str (x:xs) : ys) -> return $ fromList (Str (f x ++ xs) : ys)
(Str (x:xs) : ys) -> return $ fromList $
case f x of
[z] | z == x -> Str ([z,c] ++ xs) : ys -- combining accent
zs -> Str (zs ++ xs) : ys
[Space] -> return $ str [c]
[] -> return $ str [c]
_ -> return ils