git.iko.soy/typeable/pandoc
on master help sign in
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.

commit159863e8dad24e98be3478867d0f8ea63b2a764b authorJohn MacFarlane <jgm@berkeley.edu> dateFri 17 Aug 2018, 22:11 (8 years ago) parent4ec0205
1 file changed+4−1
src/Text/Pandoc/Readers/LaTeX.hs+4−1
src/Text/Pandoc/Readers/LaTeX.hs+4−1
@@ -1073,7 +1073,10 @@ accent :: PandocMonad m => Char -> (Char -> String) -> LP m Inlines
10731073accent c f = try $ do
10741074 ils <- tok
10751075 case toList ils of
1076− (Str (x:xs) : ys) -> return $ fromList (Str (f x ++ xs) : ys)
1076+ (Str (x:xs) : ys) -> return $ fromList $
1077+ case f x of
1078+ [z] | z == x -> Str ([z,c] ++ xs) : ys -- combining accent
1079+ zs -> Str (zs ++ xs) : ys
10771080 [Space] -> return $ str [c]
10781081 [] -> return $ str [c]
10791082 _ -> return ils