eslint fixes
This commit is contained in:
parent
abefc563d6
commit
a17677c3bf
1 changed files with 3 additions and 2 deletions
|
|
@ -82,6 +82,8 @@ function parseStyle(stylegroup: string, line: string, style: any) {
|
|||
for (const s of line.split(';')) {
|
||||
if (s == '') continue;
|
||||
const st = s.trim().split(':');
|
||||
const transformed_str = st[1].split(',').map(r => r.trim());
|
||||
let arr = transformed_str[1].split(',').map(r => r.trim());
|
||||
let cl;
|
||||
switch (st[0]) {
|
||||
case 'font-family':
|
||||
|
|
@ -138,8 +140,7 @@ function parseStyle(stylegroup: string, line: string, style: any) {
|
|||
if (stylegroup.startsWith('Subtitle') || stylegroup.startsWith('Song')) { //don't touch shadow if dialog
|
||||
break;
|
||||
}
|
||||
let transformed_str = st[1].split(',').map(r => r.trim());
|
||||
let arr = transformed_str[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