Closed Mansour-J closed 6 months ago
If you look at the PGN specification, it says:
... PGN import format move number indications may have zero or more period characters following the digit sequence that gives the move number; one or more white space characters may appear between the digit sequence and the period(s). ...
That means the following:
44......... Rf8
, no error.44 ..... Rf8
, no error.The problem lays in the 2 times .
character with spaces in between. I will think of if the grammar could be changed, to be more flexible here, but it conforms to the specification (which is not known too much ...).
Thank you for the information!
@Mansour-J I released a new patch version of pgn-parser, that fixes the bug you mentioned. Could you please check that the new version works with the examples you provided?
Sorry I was away in weekend @mliebelt - yes it is fixed - below is a screenshot of the stuff variations I tried with it ~ Thanks 🙌🙏
I generated a PGN from
chess.js
by giving it moves and callingchess.pgn()
- and now try to parse it and recieeve below errors:I have tried to load this pgn in Lichess and few other websites and they are all fine. Is there something wrong with this pgn based on the PGN spec? or it's the parser?