diff options
| author | John MacFarlane <[email protected]> | 2025-03-10 14:48:57 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2025-03-10 14:48:57 -0700 |
| commit | d68f8d2e6705db2e11a987de52f1c9f71fbef80d (patch) | |
| tree | eeca4eecbc303ee58b2d00ee6c3f9f8508e42123 | |
| parent | 7fe8c928212197354196724e9b95b71a854fdca9 (diff) | |
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.
| -rw-r--r-- | src/Text/Pandoc/Writers/Markdown/Inline.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown/Inline.hs b/src/Text/Pandoc/Writers/Markdown/Inline.hs index da04e4b5e..c45132bea 100644 --- a/src/Text/Pandoc/Writers/Markdown/Inline.hs +++ b/src/Text/Pandoc/Writers/Markdown/Inline.hs @@ -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 |
