Skip to content

Italics/Bold tags cause unwanted transcript line breaks in data-lyrics-mode #591

Closed

Description

@conorom

This definitely isn't intentional.
Probably it was missed because the demos don't use data-lyrics-mode, e.g. this one where bolding is just fine with that mode off.

For this little WebVTT excerpt:
1_WebVTT_sample
data-lyrics-mode produces this:
3_data-lyrics-mode_on_without_fix
With that mode off things are fine:
2_data-lyrics-mode_off_without_fix

I'll issue a PR which I've tested in my development environment with said sample.
It fixes the problem in data-lyrics-mode:
5_data-lyrics-mode_on_with_fix
...and seems to not cause issues with that mode off, either:
4_data-lyrics-mode_off_with_fix

The preceding line break was caused by a lack of conditional on the addition of the trailing line break here.
The following line break was caused by the space element added to the array here. This doesn't seem to do anything?

Activity

  1. added this to the 4.7 milestone on Jun 16, 2025
  2. added a commit that references this issue on Jul 24, 2025
    eb3ae78
  3. joedolson commented on Jul 24, 2025

    @joedolson
    Member

    Fixed by @conorom, added by eb3ae78

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions