question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Captions with formatting can produce nested spans

See original GitHub issue

The getCueAsHTML() method converts cue markup to html. For example:

<v John Green>The human tongue is like <i.foreignphrase><lang ja>wasabi</lang></i>: it's very powerful, and should be used sparingly</v>

This will be converted to:

<span title="John Green">The human tongue is like <i class="foreignphrase"><span lang="ja">wasabi</span></i>: it's very powerful, and should be used sparingly</span>

<span> can be added for metadata, but since Plyr uses span for styling the cue directly this causes issues.

screen shot 2018-06-05 at 14 58 16

(Opacity has been increased to better illustrate the issue)

It happens in both Chrome and Firefox (haven’t tested it in any other browser).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sampottscommented, Jun 5, 2018

An additional selector would be cleaner though I suppose. plyr__caption or something.

1reaction
sampottscommented, Jun 5, 2018

Yeah I think we’d just need to add a > child combinator.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Content Span element - HTML - MDN Web Docs
It can be used to group elements for styling purposes (using the class or id attributes), or because they share attribute values, such...
Read more >
Tables in HTML documents
The HTML table model allows authors to arrange data -- text, preformatted text, images, links, forms, form fields, other tables, etc. -- into...
Read more >
Markdown Basics - Quarto
Markdown is a plain text format that is designed to be easy to write, and, even more importantly, easy to read: A Markdown-formatted...
Read more >
CSS nested spans and width attribute - Stack Overflow
The box class gives it a border. Width gets applied only if I have wide and box together. Can someone explain to me...
Read more >
Markdown Syntax Documentation - Daring Fireball
To indicate a span of code, wrap it with backtick quotes ( ` ). Unlike a pre-formatted code block, a code span indicates...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found