Closed xuhcc closed 3 years ago
Would it make sense to instead return a compound type from parse
? One with the TodoTxtItem array, and then an array of exceptions + the lines that generated them? Obviously an API breaking change, but I think a useful one.
Perhaps this change could be for the 0.7-0.9 branches?
Thoughts?
Would it make sense to instead return a compound type from parse? One with the TodoTxtItem array, and then an array of exceptions + the lines that generated them? Obviously an API breaking change, but I think a useful one.
I like the idea, but I think an optional callback would work better and is backwards-compatible. I created another PR for that: #27
Yes! I like that a lot better, good call.
Log parsing errors to console instead of silently ignoring them