git.iko.soy/typeable/pandoc
on master help sign in
Markdown reader: Improved previous patch to allow unicode apostrophe.
4f76fe5John MacFarlane
src/Text/Pandoc/Readers/Markdown.hs+2−1
@@ -1093,7 +1093,8 @@ str = do
1093 <|> (try $ char '_' >>~ lookAhead alphaNum)
1093 <|> (try $ char '_' >>~ lookAhead alphaNum)
1094 <|> if stateStrict st
1094 <|> if stateStrict st
1095 then mzero
1095 then mzero
1096+ else (try $ satisfy (\c -> c == '\'' || c == '\x2019') >>
1096− else (try $ char '\'' >> lookAhead alphaNum >> return '\x2019')
1097+ lookAhead alphaNum >> return '\x2019')
1097 -- for things like l'aide - would be better to return
1098 -- for things like l'aide - would be better to return
1098 -- an Apostrophe, but we can't in this context
1099 -- an Apostrophe, but we can't in this context
1099 let result = a:as
1100 let result = a:as