Skip to content

Compare: "Take text, keep formatting" (#16823) - #16829

Merged
niksedk merged 1 commit into
mainfrom
claude/subtitleedit-issue-16823-c6357e
Nov 11, 2026
Merged

niksedk merged 1 commit into
mainfrom
claude/subtitleedit-issue-16823-c6357e

Conversation

@niksedk

@niksedk niksedk commented Nov 11, 2026

Copy link
Copy Markdown
Member

Part 1 of #16823: in Compare, take the reference's plain text but keep the current line's formatting.

What it does

New Take text, keep formatting action (row right-click menu, inline editor button, Alt+Shift+Left). It strips all tags from the reference text and wraps it in the tags that wrap the current line:

  • leading/trailing ASSA override blocks: {\an8}{\i1}…{\i0}, also an unclosed {\i1}…
  • HTML <i>, <b>, <u>, <font …> that open at the start and close at the end, including per-line italics (<i>a</i>\n<i>b</i> → <i>a\nb</i>)

Tags in the middle of a line are dropped, since they can't be placed once the words differ. <i>One</i> two <i>three</i> is not treated as an italic line.

The item only shows when its result differs from both the current line and a plain "Take text". The gutter arrow and Take text work as before.

Example (from the issue)

Current: {\i1}von derUniversityofSouthern California.{\i0}
Reference: von der University of Southern California.
Result: {\i1}von der University of Southern California.{\i0}

Tests

CompareFormattingKeeperTests (new) and a view-model test in CompareEditTests. All 127 Compare tests pass. Not tried by hand in the running app.

The nOCR spacing part of the issue (italic word gaps, extra spaces after "m"/"A") is not included and will be a separate PR.

🤖 Generated with Claude Code

Copies the reference line's plain text but keeps the tags that wrap the
current line: leading/trailing ASSA override blocks ({\an8}{\i1} ... {\i0})
and HTML <i>/<b>/<u>/<font> that open at the start and close at the end
(also when closed and reopened at a line break). Tags in the middle of the
line are dropped. Useful when one OCR got the italics right and another got
the letters right.

Available from the row's right-click menu, the inline editor and
Alt+Shift+Left. Shown only when the result differs from both the current
line and a plain "Take text".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@niksedk
niksedk merged commit 5e673e4 into main Nov 11, 2026
4 checks passed
@niksedk
niksedk deleted the claude/subtitleedit-issue-16823-c6357e branch November 11, 2026 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant