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 '[LC<em>TYPE]:my</em>type'.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@974 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2007-08-31 22:15:35 +00:00
parent 0c09f4c529
commit c206332558

View file

@ -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) <|>