Preserve list paragraph IDs and shorten long bookmark names - #15
Open
PiotrCzapla wants to merge 12 commits into
Open
Preserve list paragraph IDs and shorten long bookmark names#15PiotrCzapla wants to merge 12 commits into
PiotrCzapla wants to merge 12 commits into
Conversation
Use a separate heading numbering instance for each included scheme. Namespace bookmark targets and shorten long names within Word's limit. Keep headings with following content, support keep-together groups and keep-rows tables, and avoid empty pages after table page breaks. Require mdhtml 0.1.39 for the shared include-scoping implementation. Validated with the stock-plan packet and renderer suites: 73 tests passed; 2 checkout-asset tests deselected. LibreOffice rendering was inspected. Actual Microsoft Word verification remains pending because the Mac was locked and Word automation timed out.
Contributor
|
I've removed the private links from this PR too. |
Contributor
|
When you have a draft PR, please include something at the top clearly stating what's needed to move it out of draft. Also please try to avoid dense AI prose in PR descriptions where possible - I am not following what's happening here. |
Contributor
Author
I've used drafts to indicate that I haven't reviewed the PR yet, which include fixing prose or adding short summaries. I'll figure out a better way to do it locally, so that this issues don't happen again. |
PiotrCzapla
marked this pull request as ready for review
September 9, 2026 21:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These are PRs handles longer reference ids and add ability to cross refrence list items.
The desc. below is LLM authored, but reads well:
The converter now preserves list-paragraph IDs as Word bookmarks. It also shortens long bookmark names to fit Word's limit.
Fixes
id. Previously, it emitted the text but omitted the bookmark. Paragraphs without anidremain unchanged._nsuffix used for caption-number bookmarks within Word's 40-character limit.For example, this list paragraph now supplies a bookmark for the reference:
mdhtml #65 handles includes and appends scope suffixes before returning MDHTML. For example,
scope="__mic"turnssec-setupintosec-setup__mic. The dependency minimum ismdhtml>=0.1.40. This converter consumes those IDs as supplied. The existing reference-type lookup and h1 numbering reset are unchanged.Indentation and pagination fixes are separate in #17.
Rendered example
These recording guides demonstrate the include-to-DOCX workflow with suffixed IDs and references. Markdown and reproduction steps.
Validation
37 converter tests passed on this PR branch. Tests check list-paragraph bookmarks and grouped references to suffixed IDs. Generated documents passed schema validation and Pandoc readback. Combined with #17, 40 converter tests and 16 downstream integration tests passed.