Fixed markdown reader to handle "*hi **there***" as a strong nested in an emph.

(A '*' is only recognized as the end of the emphasis if it's not the beginning
of a strong emphasis.)


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1172 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2008-01-06 19:46:31 +00:00
parent 0e94609e18
commit d271473044

View file

@ -719,8 +719,9 @@ math = try $ do
char '$'
return $ Math $ joinWithSep " " words
emph = ((enclosed (char '*') (char '*') inline) <|>
(enclosed (char '_') (char '_' >> notFollowedBy alphaNum) inline)) >>=
emph = ((enclosed (char '*') (notFollowedBy' strong >> char '*') inline) <|>
(enclosed (char '_') (notFollowedBy' strong >> char '_' >>
notFollowedBy alphaNum) inline)) >>=
return . Emph . normalizeSpaces
strong = ((enclosed (string "**") (try $ string "**") inline) <|>