Markdown reader: fixed parsing of fenced code after list...

...when there is no intervening blank line.

Closes #3733.
This commit is contained in:
John MacFarlane 2017-08-18 21:46:55 -07:00
parent fbb79c1bcd
commit 5ab1162def
2 changed files with 17 additions and 1 deletions

View file

@ -868,7 +868,10 @@ rawListItem :: PandocMonad m
rawListItem start = try $ do
start
first <- listLineCommon
rest <- many (notFollowedBy listStart >> notFollowedBy blankline >> listLine)
rest <- many (do notFollowedBy listStart
notFollowedBy (() <$ codeBlockFenced)
notFollowedBy blankline
listLine)
blanks <- many blankline
return $ unlines (first:rest) ++ blanks

13
test/command/3733.md Normal file
View file

@ -0,0 +1,13 @@
````
% pandoc -t native
- Item1
- Item2
```yaml
some: code
```
^D
[BulletList
[[Plain [Str "Item1"]]
,[Plain [Str "Item2"]]]
,CodeBlock ("",["yaml"],[]) "some: code"]
````