Skip to content

fix: wire citation handler to v2 importer#3259

Open
mattConnHarbour wants to merge 2 commits into
mainfrom
SD-3120
Open

fix: wire citation handler to v2 importer#3259
mattConnHarbour wants to merge 2 commits into
mainfrom
SD-3120

Conversation

@mattConnHarbour
Copy link
Copy Markdown
Contributor

The v2 importer was missing a handler for sd:citation elements. The field preprocessor converts CITATION field codes to sd:citation XML, and the v3 translator exists, but nothing bridged them to ProseMirror nodes.

This follows the same pattern as bibliographyImporter.js.

Fixes SD-3120

The v2 importer was missing a handler for sd:citation elements.
The field preprocessor converts CITATION field codes to sd:citation XML,
and the v3 translator exists, but nothing bridged them to ProseMirror nodes.

This follows the same pattern as bibliographyImporter.js.

Fixes SD-3120

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mattConnHarbour mattConnHarbour requested a review from a team as a code owner May 12, 2026 20:35
@linear
Copy link
Copy Markdown

linear Bot commented May 12, 2026

SD-3120

@github-actions
Copy link
Copy Markdown
Contributor

Status: PASS

The diff is purely wiring — citationImporter.js is a 7-line shim that registers a handler via generateV2HandlerEntity, and docxImporter.js just adds the import and the entry to the handler list. Neither file references any OOXML elements or attributes directly, so there's nothing in this diff to violate the spec.

For context, the underlying citation-translator.js (not in this diff) handles sd:citation (SuperDoc custom namespace, not OOXML) on encode and decodes back to a standard field structure: w:r runs containing w:rPr and w:fldChar with w:fldCharType values of begin, separate, and end — all valid OOXML constructs (w:fldChar).

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Copy Markdown
Contributor

📦 Preview published: superdoc@1.32.0-pr.3259.1778622890

npm install superdoc@pr-3259

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants