Repository navigation
Description
Stage 4 — Readable, configurable exports
Synopsis
Investigate how to add optional DOCX code-line numbers while retaining editable code, correct logical-line counts, and acceptable reader/pagination behavior before committing to a production implementation.
End goal
Produce a maintainer-reviewed technical approach, reader-support contract, artifacts, and bounded implementation scope for the dependent DOCX feature.
Start after
No prerequisite issue. This work can start independently from freshly fetched origin/main; stage numbering does not require waiting for every earlier milestone. Use the repository's dedicated feature-branch/worktree workflow and record the actual base revision.
Agreed scope
- This investigation can start independently and early; it does not wait for the rest of the export milestone.
- Compare a small set of credible native/editable representations. Rasterizing code into an image does not satisfy the editable-code objective.
- Preserve all authored code lines and whitespace; wrapping and presentation metadata must not change the source-line model.
- The required DOCX reader/version matrix has not yet been named. Establish and record that matrix with the maintainer as part of accepting the investigation.
- A report and representative artifacts can complete this issue; a production feature PR is not required merely to close the investigation.
Acceptance criteria
- Provide representative documents covering highlighted/plain code, tabs/indentation, intentional blank lines, long wrapped lines, and multi-page blocks.
- Compare editability, selection/copy behavior, numbering stability, metadata placement, pagination, and accessibility/reading order for each candidate.
- Record actual reader names/versions and distinguish observed behavior from XML inspection or untested expectations.
- Recommend one approach with explicit limitations, content-preservation evidence, and a small implementation/validation plan; if requirements cannot be met, describe the tradeoff for maintainer decision.
- Record the accepted technical freeze, including design/report revision and exact prototype commit if code is supplied. Do not imply that an open proposal is an accepted freeze.
Verification
- Use actual DOCX conversion and open the generated documents in the agreed target readers.
- Retain synthetic fixtures, reproducible commands, and sanitized visual/artifact evidence; preserve full authored code for comparison.
- Do not add experimental production dependencies, rewrite the exporter, or claim broad reader compatibility as a side effect of a successful prototype.
Source pointers
src/export/pandoc.tssrc/export/language-tab.tsscripts/build-docx-reference.pymedia/export-reference.docxdocs/export-architecture.mddocs/export-verification.mdtest/fixtures/exports
Delivery contract
Deliver a reviewable investigation with synthetic fixtures, reproducible commands, reader observations, limitations, and a proposed implementation contract. Keep experimental work isolated. Accepting this report does not itself ship or validate a production numbering feature.
Work from the repository root using the Node version in .node-version and the maintained instructions in CONTRIBUTING.md, docs/building.md, and docs/testing/README.md; export changes also follow docs/export-verification.md. Run full compilation after webview JavaScript/CSS, shared-module, or translation changes, plus checks that exercise the changed behavior. Rebuild and reinstall for installed-extension evidence. Report failures/skips honestly; follow required CI and review gates. Update affected documentation and review any committed Markdown in source and rendered form.
Link the PR or investigation to this issue. Keep remediation on the same focused work item where practical. Completion requires the stated evidence and accepted outcome; opening a draft PR does not complete the issue. No deadline or assignee is imposed by this issue.
Activity