mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-11-27 06:10:28 +01:00
Don't allow '}' in comments
The PGN standard does not allow the '}' character inside a comment, because it is used to end the comment. Therefore this character is now replaced with '}' (fullwidth right curly bracket) when editing comments. This does not look great but is better than making the PGN data invalid.
This commit is contained in:
parent
bd28d178ad
commit
93213f826f
|
@ -677,8 +677,8 @@ public class DroidChessController {
|
|||
/** Set comments associated with current position. */
|
||||
public final synchronized void setComments(CommentInfo commInfo) {
|
||||
Node cur = game.tree.currentNode;
|
||||
cur.preComment = commInfo.preComment;
|
||||
cur.postComment = commInfo.postComment;
|
||||
cur.preComment = commInfo.preComment.replace('}', '\uff5d');
|
||||
cur.postComment = commInfo.postComment.replace('}', '\uff5d');
|
||||
cur.nag = commInfo.nag;
|
||||
gameTextListener.clear();
|
||||
updateGUI();
|
||||
|
|
Loading…
Reference in New Issue
Block a user