Bug in PGN parser
Closed this issue · 1 comments
kuruhuru commented
Hello!
I found a problem when loading pgn with '{\nsome comments' pattern. May be even inside '(' variation
I added example modified file wcc_2023_1.pgn
wcc_2023_1.txt
And when I run the following code the application hangs
void main(List<String> args) {
final String data = File('bin/pgn/wcc_2023_1.pgn').readAsStringSync();
final List<PgnGame<PgnNodeData>> games = PgnGame.parseMultiGamePgn(data);
print('Games: ${games.length}');
print('Game 1: ${games[0].makePgn()}');
}
veloce commented
The cause of the bug is {
?
Feel free to make a PR with a fix and and new test case. Thanks!