Match ass inline fonts to include in merger

This fixes an issue where inline fonts in the ass file wouldn't be included in the merged file
This commit is contained in:
AnimeDL 2024-04-03 13:41:23 -07:00
parent 3ca4000ed1
commit 01888286da

View file

@ -35,6 +35,10 @@ function assFonts(ass: string){
styles.push(addStyle[1]);
}
}
const fontMatches = ass.matchAll(/\\fn(.*?)(?:\\|})/g);
for (const match of fontMatches) {
styles.push(match[1]);
}
return [...new Set(styles)];
}