git.iko.soy/typeable/pandoc
on master help sign in
Minor tweaks to smart quoting code.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@497 788f1e2b-df1e-0410-8736-df70ead52e1b

commit5a48839168800fd3888f03ee7503a32aff964341 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateTue 16 Jan 2007, 23:51 (20 years ago) parent8c25738
1 file changed+3−4
src/Text/Pandoc/Readers/Markdown.hs+3−4
src/Text/Pandoc/Readers/Markdown.hs+3−4
@@ -759,14 +759,12 @@ withQuoteContext context parser = do
759759singleQuoted = try $ do
760760 singleQuoteStart
761761 withQuoteContext InSingleQuote $ do
762− notFollowedBy space
763762 result <- many1Till inline singleQuoteEnd
764763 return $ Quoted SingleQuote $ normalizeSpaces result
765764
766765doubleQuoted = try $ do
767766 doubleQuoteStart
768767 withQuoteContext InDoubleQuote $ do
769− notFollowedBy space
770768 result <- many1Till inline doubleQuoteEnd
771769 return $ Quoted DoubleQuote $ normalizeSpaces result
772770
@@ -779,15 +777,16 @@ failIfInQuoteContext context = do
779777singleQuoteStart = try $ do
780778 failIfInQuoteContext InSingleQuote
781779 char '\'' <|> char '\8216'
782− notFollowedBy (oneOf ")!],.;:-?")
780+ notFollowedBy (oneOf ")!],.;:-? \t\n")
783781
784782singleQuoteEnd = try $ do
785783 char '\'' <|> char '\8217'
786784 notFollowedBy alphaNum
787785
788−doubleQuoteStart = do
786+doubleQuoteStart = try $ do
789787 failIfInQuoteContext InDoubleQuote
790788 char '"' <|> char '\8220'
789+ notFollowedBy (oneOf " \t\n")
791790
792791doubleQuoteEnd = char '"' <|> char '\8221'
793792