In these cases, the parser incorrectly returns "1.d4" as a move instead of "d4". This seems to result from the approach of how move numbers are identified, beginning with final numRegex = RegExp(r'([0-9]+.+ )');
It seems that adding the following check can fix this:
String move = substr.substring(0, end);
if (move.contains(".")) {
move = move.substring(move.indexOf('.') + 1); //Cut off move numbers from move in case move numbers are directly followed by move without space such as "1.d4" (and not "1. d4")
}
In pgn files, the moves might be included in a way, that the move number and the move are not separated by a space:
as seen here: https://www.pgnmentor.com/files.html
In these cases, the parser incorrectly returns "1.d4" as a move instead of "d4". This seems to result from the approach of how move numbers are identified, beginning with final numRegex = RegExp(r'([0-9]+.+ )');
It seems that adding the following check can fix this: