From 7b4d3c77ec6d38cd1bbf0b8036a0a8413b5a5443 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 13 Dec 2010 19:25:22 -0800 Subject: Markdown reader: Fixed abbrev handler to allow abbrev at end of line. E.g., Mr. Frank. --- src/Text/Pandoc/Readers/Markdown.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc/Readers') diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 4bd9c9e07..65b03ab1f 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -1067,8 +1067,8 @@ str = do then case likelyAbbrev result of [] -> return $ Str result xs -> choice (map (\x -> - try (string x >> char ' ' >> - notFollowedBy spaceChar >> + try (string x >> oneOf " \n" >> + lookAhead letter >> return (Str $ result ++ spacesToNbr x ++ "\160"))) xs) <|> (return $ Str result) else return $ Str result -- cgit v1.2.3