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
commitd2714730440e77de6eb87840b868162b7b4ee19f
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>
dateSun 6 Jan 2008, 19:46 (19 years ago)
parent0e94609
Text/Pandoc/Readers/Markdown.hs+3−2
@@ -719,8 +719,9 @@ math = try $ do
719719 char '$'
720720 return $ Math $ joinWithSep " " words
721721
722−emph = ((enclosed (char '*') (char '*') inline) <|>
723− (enclosed (char '_') (char '_' >> notFollowedBy alphaNum) inline)) >>=
722+emph = ((enclosed (char '*') (notFollowedBy' strong >> char '*') inline) <|>
723+ (enclosed (char '_') (notFollowedBy' strong >> char '_' >>
724+ notFollowedBy alphaNum) inline)) >>=
724725 return . Emph . normalizeSpaces
725726
726727strong = ((enclosed (string "**") (try $ string "**") inline) <|>