From c206332558ad3ef4607c701cfa688695197f24e1 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Fri, 31 Aug 2007 22:15:35 +0000 Subject: Changed definition of 'emph': italics with '_' must not be followed by an alphanumeric character. This is to help prevent interpretation of e.g. [LC_TYPE]: my_type as '[LCTYPE]:mytype'. git-svn-id: https://pandoc.googlecode.com/svn/trunk@974 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Readers/Markdown.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 95bcc5d5a..780ed0aff 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -686,7 +686,7 @@ math = try $ do return $ TeX ("$" ++ (joinWithSep " " words) ++ "$") emph = ((enclosed (char '*') (char '*') inline) <|> - (enclosed (char '_') (char '_') inline)) >>= + (enclosed (char '_') (char '_' >> notFollowedBy alphaNum) inline)) >>= return . Emph . normalizeSpaces strong = ((enclosed (string "**") (try $ string "**") inline) <|> -- cgit v1.2.3