diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-01-16 23:46:33 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-01-16 23:46:33 +0000 |
commit | 8c257385ac83206dac5f22b399079d14dcb353cc (patch) | |
tree | 0df22821b9b9ba5fdabfd34fd1718cad06c6c81e /src/Text | |
parent | f3cf1cc1686d490789b38852d4cc6444f94d5806 (diff) | |
download | pandoc-8c257385ac83206dac5f22b399079d14dcb353cc.tar.gz |
Fixed bug in smart quote recognition: ' before ) or certain
other punctuation must not be an open quote.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@496 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index f8071a2b7..14dcd5d66 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -776,13 +776,14 @@ failIfInQuoteContext context = do then fail "already inside quotes" else return () -singleQuoteStart = do +singleQuoteStart = try $ do failIfInQuoteContext InSingleQuote char '\'' <|> char '\8216' + notFollowedBy (oneOf ")!],.;:-?") -singleQuoteEnd = try (do +singleQuoteEnd = try $ do char '\'' <|> char '\8217' - notFollowedBy alphaNum) + notFollowedBy alphaNum doubleQuoteStart = do failIfInQuoteContext InDoubleQuote |