Repository navigation
Conversation
…kdown edit writes A whole-paragraph markdown edit that splits one paragraph into several stamps the replaced paragraph's run formatting onto every new block, but the ride-along --clear / --bold / … only reached the first one, so a coloured template placeholder kept its colour on every line after the first. Edit.paragraph now returns all the new blocks and the new Edit.restyleBlocks clears then sets formatting on each paragraph among them (single-op and --batch). The node-targeted clear/set helpers are gone; span ride-alongs use the locator-based clearFormatting/setFormatting. Fixes #60 Triage-Routine: true Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LkctEPJa5FWBzPoeq7imqE
This branch has not been deployed
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.
🤖 docx-cli triage
What was wrong
In a whole-paragraph markdown
editthat splits one paragraph into several, every new block takes on the replaced paragraph's run formatting. The ride-alongclear/--bold/ … flags only reached the first block. In the repro,echo '{"at":"p0","markdown":"First\n\nSecond","clear":"color"}' | docx edit c.docx --batch -still read<span style="color:#FF0000">Second</span> <!-- p1 -->. Single-op--clearand--boldbehaved the same way.What changed
Edit.paragraphnow returnsnodes(every block the edit produced) instead of only the firstnode.Edit.restyleBlocksclears first, then sets formatting, on each paragraph among those blocks. It skips non-paragraph blocks such as a markdown table and refuses withUSAGEwhen the content has no paragraph at all, as before. Both single-op and--batchuse it.clearFormattingNode/setFormattingNode. The span ride-alongs now call the locator-basedclearFormatting/setFormatting.--bold, and tracked clear. No new fixture, because this is a fix to an existing flag and not a new surface.Verification
First <!-- p0 -->/<span style="color:#FF0000">Second</span> <!-- p1 -->. After:First <!-- p0 -->/Second <!-- p1 -->.--boldnow bolds both blocks.bun run check✅bun run test:unit✅ (2103 tests)Decisions for you
"Intro\n\n| a |…"+--bold), the flags format the paragraphs and skip the table cells. Before this change the result depended on which block came first. Should they also reach the table-cell paragraphs?Fixes #60
Generated by Claude Code