Markdown reader: fixed parsing of fenced code after list...
...when there is no intervening blank line.
Closes #3733.
commit5ab1162def4e6379c84e3363d917252155d9239a
authorJohn MacFarlane <jgm@berkeley.edu>
dateFri 18 Aug 2017, 21:46 (9 years ago)
parentfbb79c1
src/Text/Pandoc/Readers/Markdown.hs+4−1
@@ -868,7 +868,10 @@ rawListItem :: PandocMonad m
868868rawListItem start = try $ do
869869 start
870870 first <- listLineCommon
871− rest <- many (notFollowedBy listStart >> notFollowedBy blankline >> listLine)
871+ rest <- many (do notFollowedBy listStart
872+ notFollowedBy (() <$ codeBlockFenced)
873+ notFollowedBy blankline
874+ listLine)
872875 blanks <- many blankline
873876 return $ unlines (first:rest) ++ blanks
874877
test/command/3733.mdnew file+13
@@ -0,0 +1,13 @@
1+````
2+% pandoc -t native
3+- Item1
4+- Item2
5+```yaml
6+some: code
7+```
8+^D
9+[BulletList
10+ [[Plain [Str "Item1"]]
11+ ,[Plain [Str "Item2"]]]
12+,CodeBlock ("",["yaml"],[]) "some: code"]
13+````