mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-04-02 18:30:44 +02: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. */
|
/** Set comments associated with current position. */
|
||||||
public final synchronized void setComments(CommentInfo commInfo) {
|
public final synchronized void setComments(CommentInfo commInfo) {
|
||||||
Node cur = game.tree.currentNode;
|
Node cur = game.tree.currentNode;
|
||||||
cur.preComment = commInfo.preComment;
|
cur.preComment = commInfo.preComment.replace('}', '\uff5d');
|
||||||
cur.postComment = commInfo.postComment;
|
cur.postComment = commInfo.postComment.replace('}', '\uff5d');
|
||||||
cur.nag = commInfo.nag;
|
cur.nag = commInfo.nag;
|
||||||
gameTextListener.clear();
|
gameTextListener.clear();
|
||||||
updateGUI();
|
updateGUI();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user