# Fixed-version source diagnosis

Accessed: 2026-10-29. Source version: tag `3.11`, matching the installed Pandoc binary.

Source URL: https://raw.githubusercontent.com/jgm/pandoc/3.11/src/Text/Pandoc/Writers/Docx/OpenXML.hs

`blocksToOpenXML` filters foreign raw blocks with `isForeignRawBlock` before converting native blocks. Its criterion is:

```haskell
isForeignRawBlock (RawBlock format _) = format /= "openxml"
```

`blockToOpenXML'` handles native Table separately through `tableToOpenXML`. The Header branch selects the corresponding heading paragraph style. `inlineToOpenXML'` emits native line breaks, accepts raw inline OpenXML, and reports other raw inline formats as unrendered. Its Math branch calls:

```haskell
convertMath writeOMML mathType str
```

This predicts distinct failures before applying any reference stylesheet. A raw HTML table can be absent even when native headings receive the reference's size. A native table may survive while its raw HTML line break disappears. Native Math can become OMML; raw dollar text cannot trigger that branch. The local AST and OOXML counts test these predictions.

The HTML bridge re-parses HTML into native nodes before the same DOCX writer. It does not make the writer accept raw HTML or promise CSS fidelity.
