diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-06-10 14:42:08 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-06-10 14:42:08 -0700 |
commit | 2e12106a901cf2574a7ef50975e71be13d02fca9 (patch) | |
tree | 1a08a21ece0fb86765bc99bc78fc831f220cd83b | |
parent | 01bbb52628d8151d9f624fab4a95fa9f8a54a1c2 (diff) | |
download | pandoc-2e12106a901cf2574a7ef50975e71be13d02fca9.tar.gz |
Asciidoc writer: ensure correct nesting strong/emph.
Closes #5565.
-rw-r--r-- | src/Text/Pandoc/Writers/AsciiDoc.hs | 2 | ||||
-rw-r--r-- | test/command/5565.md | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/AsciiDoc.hs b/src/Text/Pandoc/Writers/AsciiDoc.hs index 31827fd69..cf5fec86f 100644 --- a/src/Text/Pandoc/Writers/AsciiDoc.hs +++ b/src/Text/Pandoc/Writers/AsciiDoc.hs @@ -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 diff --git a/test/command/5565.md b/test/command/5565.md new file mode 100644 index 000000000..1459e066d --- /dev/null +++ b/test/command/5565.md @@ -0,0 +1,6 @@ +``` +% pandoc -t asciidoc +***hi*** +^D +*_hi_* +``` |