aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2011-12-27 11:01:34 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2011-12-27 11:01:34 -0800
commit4f76fe5a1debfb61cba8b20474d30fc5632f4be4 (patch)
tree7668f4c0d8a27377af2b7914b63eae9633987500
parent8f1da359174f99e0da447491ed49a54873b54827 (diff)
downloadpandoc-4f76fe5a1debfb61cba8b20474d30fc5632f4be4.tar.gz
Markdown reader: Improved previous patch to allow unicode apostrophe.
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index b80d3871a..96b2d4315 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -1093,7 +1093,8 @@ str = do
<|> (try $ char '_' >>~ lookAhead alphaNum)
<|> if stateStrict st
then mzero
- else (try $ char '\'' >> lookAhead alphaNum >> return '\x2019')
+ else (try $ satisfy (\c -> c == '\'' || c == '\x2019') >>
+ lookAhead alphaNum >> return '\x2019')
-- for things like l'aide - would be better to return
-- an Apostrophe, but we can't in this context
let result = a:as