You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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")
}
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: