ass inline font regex optimization

This commit is contained in:
AnimeDL 2024-04-04 09:27:10 -07:00
parent 42da4ebd30
commit 7d5e8fa461

View file

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