Trying to convert a simple image with a text alternative in markdown to, say, HTML results in unepectedly complex output.

is output as
<figure>
<img src="foo.jpg" alt="" /><figcaption>text alternative</figcaption>
</figure>
when really, it should just be
<img src="foo.jpg" alt="text alternative" />
Trying to convert to jira, the output becomes
!foo.jpg|title=fig:!
when really, I'd expect
!foo.jpg|alt=text alternative!
pandoc 2.10 / Compiled with pandoc-types 1.21, texmath 0.12.0.2, skylighting 0.8.5
and I see now that the HTML part at least is due to https://github.com/jgm/pandoc/issues/4737 (which i'd say is a nasty hack, as it changes the meaning of what the markdown intends the alt text to be). but the jira behavior is just...odd.
to expand on the above, alternative text is meant to be just that. not a figure caption, but simply alt text (in supporting formats)
In the implicit_figures extension comment in the guide, you can simulate an inline image by just adding non breaking space (\) at the end:
\
This will give you the html:
<p><img src="foo.jpg" alt="text alternative" /><br />
</p>
This doesn't help for your jira output though.
jep, just use pandoc -f markdown-implicit_figures
see https://pandoc.org/MANUAL.html#extension-implicit_figures
For future questions, please use the pandoc-discuss mailing list instead of this issue tracker. Thanks!
For future questions
these were, in my mind, bugs, not questions. but fair enough...
[edit: additionally, that hack to get markdown images to be inline rather than figures looks...very non-standard, as the markdown that way would normally render an extra backslash after the image when processed in stuff other than pandoc. i guess i'll need to account for some intermediate processing then first before putting clean markdown files through pandoc for conversion, which is unfortunate]
I'd like to keep this open for the Jira issue.
@patrickhlauke a more standard alternative is to use an (potentially empty) HTML comment:
<!-- not a figure -->
i guess i'll need to account for some intermediate processing then first before putting clean markdown files through pandoc for conversion, which is unfortunate
If you don't want some of the special behaviors that pandoc's Markdown enables, just turn them off. Use -f markdown_strict or -f gfm or just selectively disable the extensions you don't want. (E.g. -f markdown-implicit_figures)
aha, thanks @jgm that's probably close to what i was after - i should have studied the docs more deeply. this fixes the HTML case (though for jira, it then completely omits the alt text)

using pandoc -f markdown_strict -t jira, pandoc -f gfm -t jira and pandoc -f markdown-implicit_figures -t jira ends up as just
![foo.jpg]