Markdown writer: treat Emph [Emph ils]] as ils.

Otherwise we get `**content**` which means strong emphasis.

This is a more robust solution than using `_`, which won't work
for intraword emphasis.

Closes #10642.
This commit is contained in:
John MacFarlane
2025-03-10 14:48:57 -07:00
parent 7fe8c92821
commit d68f8d2e67
@@ -365,6 +365,8 @@ inlineToMarkdown opts (Span attrs ils) = do
tagWithAttrs "span" attrs <> contents <> literal "</span>"
| otherwise -> contents
inlineToMarkdown _ (Emph []) = return empty
inlineToMarkdown opts (Emph [Emph ils]) = -- #10642
inlineListToMarkdown opts ils
inlineToMarkdown opts (Emph lst) = do
variant <- asks envVariant
contents <- inlineListToMarkdown opts lst