Files
pandoc/test/command/11944.md
T
Aslak HellesøyandClaude Opus 5.5 f4d4af66db Docx reader: read w:fldSimple fields. (#11946)
A `w:fldSimple` element had no case in `elemToParPart'`, so `mapD` dropped it
together with its result runs: "Figure <fldSimple>1</fldSimple> Caption"
read as "Figure Caption", and a simple REF field lost its text. It is now
read as a Field with its runs as children, like a complex field.

`stripCaptionLabel` relied on that drop to remove the number after an
English Figure/Table label; it now drops the number field explicitly, so
those captions read as before.

Closes #11944.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 09:00:13 -07:00

456 B

A w:fldSimple keeps its result text; a REF field with \h becomes a link to the bookmark it refers to. A caption whose label is not Figure or Table keeps its label and number.

% pandoc command/11944.docx -t html
^D
<p>See figure <a href="#_Ref1">1</a>.</p>
<figure>
<img src="media/image1.png" style="width:1.09702in;height:1.09702in" />
<figcaption><p><span id="_Ref1" class="anchor"></span>Figur 1 Blue
square.</p></figcaption>
</figure>