Closed
Description
If I put some of a caption in emphasis, then convert to DOCX with pandoc 3.6.4, then convert back to Markdown, the emphasis is lost, sort of.
Example, saved as foo.md
:

Conversion command:
pandoc --to=docx foo.md --output=foo.docx
Screenshot of docx:
It looks like the emphasis is lost here, but it clearly isn't, because if I try converting back to Markdown with the following command:
pandoc --to=markdown-raw_html foo.docx --output=bar.md
I get this in bar.md
:
:::: figure
{width="5.833333333333333in"
height="7.583576115485564in"}
::: caption
Foo *emphasis*
:::
::::
So it seems that the emphasis is lost in the image link, but not in the actual caption.
If I don't use -raw_
525E
html
, then the emphasis kept in the figcaption
element produced:
<figure>
<img src="media/rId20.jpg" style="width:5.83333in;height:7.58358in"
alt="Foo emphasis" />
<figcaption aria-hidden="true"><p>Foo <em>emphasis</em></p></figcaption>
</figure>
It may be that this problem is fixed by 2155b5f