aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Markdown.hs
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-01-16 23:51:57 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-01-16 23:51:57 +0000
commit5a48839168800fd3888f03ee7503a32aff964341 (patch)
tree16e3b65808d3ffb7972335b7c265ba4996209dfd /src/Text/Pandoc/Readers/Markdown.hs
parent8c257385ac83206dac5f22b399079d14dcb353cc (diff)
downloadpandoc-5a48839168800fd3888f03ee7503a32aff964341.tar.gz
Minor tweaks to smart quoting code.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@497 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc/Readers/Markdown.hs')
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 14dcd5d66..601169f66 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -759,14 +759,12 @@ withQuoteContext context parser = do
singleQuoted = try $ do
singleQuoteStart
withQuoteContext InSingleQuote $ do
- notFollowedBy space
result <- many1Till inline singleQuoteEnd
return $ Quoted SingleQuote $ normalizeSpaces result
doubleQuoted = try $ do
doubleQuoteStart
withQuoteContext InDoubleQuote $ do
- notFollowedBy space
result <- many1Till inline doubleQuoteEnd
return $ Quoted DoubleQuote $ normalizeSpaces result
@@ -779,15 +777,16 @@ failIfInQuoteContext context = do
singleQuoteStart = try $ do
failIfInQuoteContext InSingleQuote
char '\'' <|> char '\8216'
- notFollowedBy (oneOf ")!],.;:-?")
+ notFollowedBy (oneOf ")!],.;:-? \t\n")
singleQuoteEnd = try $ do
char '\'' <|> char '\8217'
notFollowedBy alphaNum
-doubleQuoteStart = do
+doubleQuoteStart = try $ do
failIfInQuoteContext InDoubleQuote
char '"' <|> char '\8220'
+ notFollowedBy (oneOf " \t\n")
doubleQuoteEnd = char '"' <|> char '\8221'