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
Hi @mliebelt!
I'm new with PGN and I have an issue with PGN parser with pgn.js.
I have PGN fragment 1.Bxc4 d5 2.Bxd5 Qxd5 3.a5 {!} $16 - and here I have parser exception with message from pgnvjs.js
The reason for that is, that the PgnViewerJS currently does not accept comments at any point. Here are the options that will work (I have added some words to the comment to make sure that everyone understands that this is the comment, it will of course work without):
Before the move number: {! this is a comment } 1.e4 $16
After the move number: 1. {! this is a comment } e4 $16
After the complete move: 1. e4 $16 {! this is a comment } (including the NAGs)
I will check the grammar if it is easy to add comments between move and NAGs, but this may be endless. Something like 1. e4 ! { good move} ? { but I don't like it } would be a nightmare to parse.
The easiest fix for you is to change the PGN itself, so that the comments are coming after the NAGs.
Btw, comments are allowed anywhere outside so called tokens. See the PGN specification for details. This ticket is related to #97.
Well, after changing the grammar again and again, I am pretty sure that I will never ever implement that feature. Not only the reading will be a nightmare, but also the print-out. So i will close that ticket without a fix. Sorry!
Hi @mliebelt!
I'm new with PGN and I have an issue with PGN parser with
pgn.js
.I have PGN fragment
1.Bxc4 d5 2.Bxd5 Qxd5 3.a5 {!} $16
- and here I have parser exception with message frompgnvjs.js
How can I fix it with current configuration?
The text was updated successfully, but these errors were encountered: