Open Yang-Xijie opened 2 years ago
It should be weird to have newline between two node. However, when it comes to the end of the file, multiple newlines should not be considered a error.
Oh, someone actually noticed this project, wow well, that is just because the parser is too dumb and not so smart, that can be fixed by handling this edge case
This is OK:
This is also OK with only one newline:
However, more than two newlines will cause a fatal error:
output
Xcode debug
0_swift_runtime_on_report
:Thread 1: Fatal error: Error raised at top level: Backend.SubRipParserError.notFullNodeDeclaration(column: 0, row: 1)
macOS 12.4 Xcode 13.4.1
$ swift --version
swift-driver version: 1.45.2 Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12) Target: x86_64-apple-macosx12.0
SubtitleKit version: a4a97bc1ff79bba54f2d761c87d9468f19ed9d14