ColorToDialog - Dash not being added when a different character speaks (color change)

Open
#221 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp
Domain
desktop-dev

Research direction

Start with ColorToDialogUnitTest.cs and run the existing TestDialog3 case to compare its behavior with the issue examples. Then locate the ColorToDialog handling for consecutive colored lines and reproduce the missing-dash case. Done means speaker changes between colored lines produce the expected dash without altering lines from the same speaker.

Written by the indexing model from the issue text.

Description

The plugin successfully adds a dash when a line next to a colored line has no color.
But it doesn't add it when there are lines with different colors.

For example.

Currently it turns this:

1
00:00:01,280 --> 00:00:02,639
Wow! #blue
I can believe this! #blue

2
00:00:02,720 --> 00:00:04,039
This is amazing! #blue
This is terrible! #red

Into this

1
00:00:01,280 --> 00:00:02,639
Wow!
I can't believe this!

2
00:00:02,720 --> 00:00:04,039
This is amazing!
This is terrible! 

**When it actually should be:

1
00:00:01,280 --> 00:00:02,639
Wow!
I can't believe this!

2
00:00:02,720 --> 00:00:04,039
 - This is amazing!
 - This is terrible! 

Or even this, (although it's not that usual)

1
00:00:01,280 --> 00:00:02,639
Wow!
I can't believe this!

2
00:00:02,720 --> 00:00:04,039
This is amazing! ((no dash since the previous line comes from the same character)
 - This is terrible! 

Otherwise, it's "destroying" info,
Currently it works if one of the lines have no color, but it won't work if the two of them are already colored.

I can't seem to replicate the "TestDialog3" result from ColorToDialogUnitTest.cs , so I'm not sure if it's working as intended.

tl;dr the plugin won't add a dash if all lines contain a "<font " tag

Dominant language
C#
Stars
137
Forks
48
Avg merge
5m
Merged PRs (30d)
6

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SubtitleEdit/plugins

All issues in SubtitleEdit/plugins

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.