Same class of bug as the DOCX one, different cause. A Markdown image is stored as
a path, so Pandoc has to open the file to embed it - and it resolves that path
against its own working directory, which for a running Shift is nowhere near the
document. 智飞空地一体化低空应用平台技术方案.md references images/system-architecture.png
and images/production-deployment-topology.png; both came back as "Could not fetch
resource", and Pandoc replaced each figure with its alt text. The DOCX was 22 KB
with no word/media entry at all.
Passing --resource-path of the source's own folder fixes DOCX, RTF and HTML in one
line. It is additive rather than a replacement: Pandoc still searches the working
directory too, so a figure that resolved before still resolves - verified with two
images of the same relative name in two different folders, both of which landed in
the output.
md -> pdf already worked, because Pandoc leaves the path untouched there and hands
the HTML to the renderer with a base URL pointing at the document's folder; only
the routes where Pandoc must read the bytes itself were affected. md -> html was
the quieter case: --self-contained promises one portable file, and without the
figures inlined the single HTML opened as a broken image icon.
keeps_markdown_images_when_converting_to_word pins docx and rtf. It fails against
the previous build with "docx ... lost the picture", and the RTF check reads the
pngblip marker rather than assuming a zip.