Markdown reader: fix interaction of --strip-comments and list
parsing. Use of `--strip-comments` was causing tight lists to be rendered as loose (as if the comment were a blank line). Closes #7521.
This commit is contained in:
parent
5a23f8ff3e
commit
3f9b7a10ad
2 changed files with 12 additions and 1 deletions
|
@ -829,7 +829,7 @@ listLineCommon :: PandocMonad m => MarkdownParser m Text
|
|||
listLineCommon = T.concat <$> manyTill
|
||||
( many1Char (satisfy $ \c -> c `notElem` ['\n', '<', '`'])
|
||||
<|> fmap snd (withRaw code)
|
||||
<|> fmap snd (htmlTag isCommentTag)
|
||||
<|> fmap (renderTags . (:[]) . fst) (htmlTag isCommentTag)
|
||||
<|> countChar 1 anyChar
|
||||
) newline
|
||||
|
||||
|
|
11
test/command/7521.md
Normal file
11
test/command/7521.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
```
|
||||
% pandoc -- --strip-comments
|
||||
- one
|
||||
<!-- with comm -->
|
||||
- two
|
||||
- ^D
|
||||
<ul>
|
||||
<li>one </li>
|
||||
<li>two</li>
|
||||
</ul>
|
||||
```
|
Loading…
Reference in a new issue