weizhenye / ass-compiler

Parses and compiles ASS subtitle format to easy-to-use data structure
https://ass.js.org/ass-compiler/
MIT License
107 stars 18 forks source link

TypeError: Cannot read property '1' of null #9

Closed Deathspike closed 1 year ago

Deathspike commented 1 year ago

I encountered the following error parsing an .ass file with 0.1.4:

TypeError: Cannot read properties of null (reading '1')
    at parseTag (C:\Users\Deathspike\OneDrive\Data\Sources\normalize-ssa\node_modules\ass-compiler\dist\ass-compiler.js:84:24)
    at Array.map (<anonymous>)
    at parseTags (C:\Users\Deathspike\OneDrive\Data\Sources\normalize-ssa\node_modules\ass-compiler\dist\ass-compiler.js:174:17)
    at parseText (C:\Users\Deathspike\OneDrive\Data\Sources\normalize-ssa\node_modules\ass-compiler\dist\ass-compiler.js:184:18)
    at parseDialogue (C:\Users\Deathspike\OneDrive\Data\Sources\normalize-ssa\node_modules\ass-compiler\dist\ass-compiler.js:231:22)
    at Object.parse (C:\Users\Deathspike\OneDrive\Data\Sources\normalize-ssa\node_modules\ass-compiler\dist\ass-compiler.js:313:49)
    at run (C:\Users\Deathspike\OneDrive\Data\Sources\normalize-ssa\dist\functions\parseAsync.js:26:26)
    at Object.parseAsync (C:\Users\Deathspike\OneDrive\Data\Sources\normalize-ssa\dist\functions\parseAsync.js:9:22)
    at async Object.extractAsync (C:\Users\Deathspike\OneDrive\Data\Sources\normalize-ssa\dist\functions\extractAsync.js:12:16)
    at async traceAsync (C:\Users\Deathspike\OneDrive\Data\Sources\normalize-ssa\dist\actions\parseAsync.js:55:24)

This occurred in the following ass subtitle:

The World God Only Knows - S02E09.eng.zip

Let me know if I can provide more info 👍

weizhenye commented 1 year ago

fix in v0.1.5