Asciidoc writer: ensure correct nesting strong/emph.

Closes #5565.
This commit is contained in:
John MacFarlane 2019-06-10 14:42:08 -07:00
parent 01bbb52628
commit 2e12106a90
2 changed files with 8 additions and 0 deletions

View file

@ -405,6 +405,8 @@ withIntraword p = setIntraword True *> p <* setIntraword False
-- | Convert Pandoc inline element to asciidoc.
inlineToAsciiDoc :: PandocMonad m => WriterOptions -> Inline -> ADW m Doc
inlineToAsciiDoc opts (Emph [Strong xs]) =
inlineToAsciiDoc opts (Strong [Emph xs]) -- see #5565
inlineToAsciiDoc opts (Emph lst) = do
contents <- inlineListToAsciiDoc opts lst
isIntraword <- gets intraword

6
test/command/5565.md Normal file
View file

@ -0,0 +1,6 @@
```
% pandoc -t asciidoc
***hi***
^D
*_hi_*
```