mirror of
https://github.com/anidl/multi-downloader-nx.git
synced 2026-04-21 08:21:56 +00:00
Fix text-shadow parsing error in vtt2ass
Should hopefully fix the warnings about text-shadow being improperly parsed
This commit is contained in:
parent
0fcf1e95bf
commit
5dfea78822
1 changed files with 1 additions and 2 deletions
|
|
@ -138,8 +138,7 @@ function parseStyle(stylegroup: string, line: string, style: any) {
|
|||
if (stylegroup.startsWith('Subtitle') || stylegroup.startsWith('Song')) { //don't touch shadow if dialog
|
||||
break;
|
||||
}
|
||||
transformed_str = st[1].split(',').map(r => r.trim());
|
||||
arr = transformed_str[1].split(',').map(r => r.trim());
|
||||
arr = transformed_str = st[1].split(',').map(r => r.trim());
|
||||
arr = arr.map(r => { return (r.split(' ').length > 3 ? r.replace(/(\d+)px black$/, '') : r.replace(/black$/, '')).trim(); });
|
||||
transformed_str[1] = arr.map(r => r.replace(/-/g, '').replace(/px/g, '').replace(/(^| )0( |$)/g, ' ').trim()).join(' ');
|
||||
arr = transformed_str[1].split(' ');
|
||||
|
|
|
|||
Loading…
Reference in a new issue