From 5a48839168800fd3888f03ee7503a32aff964341 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Tue, 16 Jan 2007 23:51:57 +0000 Subject: Minor tweaks to smart quoting code. git-svn-id: https://pandoc.googlecode.com/svn/trunk@497 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Readers/Markdown.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/Text/Pandoc/Readers') 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' -- cgit v1.2.3