summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2022-08-07 08:25:24 -0700
committerGitHub <noreply@github.com>2022-08-07 08:25:24 -0700
commit865b2ab11469f3bd1bc4d7b3669cb4626c37be08 (patch)
tree3e81d19c4fa0f52643390717a867f845e75e6a0f
parent99789e0b9d44ecf7ee683e4954d43ee5b040132a (diff)
parentca1e78798ab515fc687f94c2d4a0cbb3402a0375 (diff)
Merge pull request #33 from jitwit/lan-promotion
-rw-r--r--chess-algebraic.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/chess-algebraic.el b/chess-algebraic.el
index 8fb4fa0..b27be1a 100644
--- a/chess-algebraic.el
+++ b/chess-algebraic.el
@@ -65,7 +65,9 @@
(group (optional (char "a-h")) (optional (char "1-8")))
(optional (group (char ?- ?x)))
(group (char "a-h") (char "1-8"))
- (optional (group ?= (group (char ?N ?B ?R ?Q ?K)))))))
+ (optional
+ (group (optional ?=)
+ (group (char ?N ?B ?R ?Q ?n ?b ?r ?q)))))))
(optional (group (char ?+ ?#))))
"A regular expression that matches all possible algebraic moves.
This regexp handles both long and short form.")
@@ -136,7 +138,7 @@ This regexp handles both long and short form.")
(list which target))))
(chess-error 'no-candidates move))))))
(when promotion
- (nconc changes (list :promote (aref promotion 0))))))
+ (nconc changes (list :promote (upcase (aref promotion 0)))))))
(when changes
(if (and trust mate)