mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-13 15:46:46 +03:00
fix(WebVTT): Fix lines starting with spaces don't break correctly (#9100)
This only happens when there are multiple line breaks.
This commit is contained in:
committed by
GitHub
parent
48b1f092f4
commit
2eb3b0a9c8
+1
-1
@@ -435,7 +435,7 @@ shaka.text.Cue = class {
|
||||
|
||||
cue.payload = '';
|
||||
|
||||
const xmlPayload = '<span>' + payload.replace('\n', '<br />') + '</span>';
|
||||
const xmlPayload = '<span>' + payload.replace(/\n/g, '<br />') + '</span>';
|
||||
let element;
|
||||
try {
|
||||
element = TXml.parseXmlString(xmlPayload, 'span');
|
||||
|
||||
Reference in New Issue
Block a user