Skip to content

Split line: keep all ASSA tags and strip dialog dash on tagged lines - #14801

Merged
niksedk merged 1 commit into
mainfrom
claude/subtitleedit-issue-14800-f547dc
Sep 12, 2026
Merged

Split line: keep all ASSA tags and strip dialog dash on tagged lines#14801
niksedk merged 1 commit into
mainfrom
claude/subtitleedit-issue-14800-f547dc

Conversation

@niksedk

@niksedk niksedk commented Sep 12, 2026

Copy link
Copy Markdown
Member

Fixes #14800.

Italic lost on split. The ASSA reader merges adjacent override blocks, so {\i1}{\c&H00ff00&} arrives as {\i1\c&H00ff00&}. The split propagation matched on the literal \i1}, which no longer occurs, so italic was dropped from the second half. Propagation now parses each {\...} block into tags and tracks the active bold/italic/underline/font/colour state, honouring {\c} and {\r} resets.

Dash kept on a tagged dialog line. The two-line dialog split trimmed dashes from the raw line, so {\i1}- Hi!{\i0} kept its dash. It now uses DialogSplitMerge.RemoveStartDash, which skips leading tags, and GetStartTags handles more than one leading ASSA block.

Tests added in SplitManagerTests for the merged block, the colour reset, and dialog lines with ASSA/HTML tags.

🤖 Generated with Claude Code

Fixes #14800.

- PropagateAssaTags now walks each {\...} override block and tracks the
  active bold/italic/underline/font/colour state, so a toggle that is not
  last in a merged block ("{\i1\c&H00ff00&}") is still re-opened on the
  second half; {\c} and {\r} reset the tracked state.
- The two-line dialog split now uses DialogSplitMerge.RemoveStartDash so
  a line like "{\i1}- Hi!{\i0}" loses its dash too; GetStartTags skips
  several leading ASSA blocks.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@niksedk
niksedk merged commit f14f950 into main Sep 12, 2026
1 check failed
@niksedk
niksedk deleted the claude/subtitleedit-issue-14800-f547dc branch September 12, 2026 12:22
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.

ASSA: Losing formatting tags when splitting line + Formatted dialogs with hyphen

1 participant