Files
pandoc/test
John MacFarlane 3a5f7ecee1 RTF reader: support legacy \pn/\pntext paragraph numbering (#11686).
Word-95-style numbered and bulleted lists are encoded with a
`{\pntext ...}` auto-number destination at the start of each list
paragraph plus a `{\*\pn ...}` destination describing the numbering,
rather than the modern `\listtext`/`\listtable` mechanism.  Two problems:

1. The `\pntext` marker text ("1.", "·", etc.) was captured as the
   paragraph's first text run, which sits before the paragraph's
   `\ls`/`\ilvl`, so emitBlocks (which reads list properties from the first
   run) misclassified the paragraph as an ordinary paragraph.  The first
   item of each list therefore came out as a stray paragraph.

2. The numbering style was ignored, so numbered lists defaulted to
   bullets.

Treat `\pntext` like `\listtext`: drop its visible marker text and flag the
start of a new list item.  Parse the `{\*\pn ...}` destination
(`\pnlvlbody`/`\pnlvlblt`, `\pndec`, `\pnucltr`, `\pnlcltr`,
`\pnucrm`, `\pnlcrm`, `\pnstart`, and the `\ls`/`\ilvl` keys it
carries) into the list override table so numbered lists are
emitted as ordered lists with the right number style.

`\pn` is a paragraph property that remains in effect until reset
by `\pard`, auto-numbering every paragraph in scope. Track
this (`sPnActive`) so each paragraph becomes its own list item,
rather than merging markerless continuation paragraphs as is done
for modern `\listtext` lists.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-09 08:49:17 +02:00
..
2026-06-09 08:42:09 +02:00
2023-01-13 09:13:27 -08:00
2025-09-15 12:45:28 +02:00
2024-02-13 23:10:42 -08:00
2024-11-06 10:04:33 -08:00
2024-11-06 10:04:33 -08:00
2024-12-27 11:10:48 -08:00
2025-11-05 12:49:46 +01:00
2024-05-31 09:38:34 -06:00
2025-09-15 12:45:28 +02:00
2023-07-06 12:20:20 -07:00
2025-11-05 12:49:46 +01:00
2024-05-15 18:08:13 -07:00
2025-09-15 12:45:28 +02:00