summaryrefslogtreecommitdiff
path: root/chess-algebraic.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-09-02 06:07:46 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-09-02 06:08:00 -0400
commitb651df304c04900c38b71fbf1d69bc9c3a56e7b1 (patch)
tree189610fa685752f201d8992b57f9577579ea4b55 /chess-algebraic.el
parentdfa8e3a39f5572c8426336f4e4140d43e28bf963 (diff)
Implemented a safer method for parsing algebraic moves, since for some reason
we weren't always seeing the full move when using looking-at. The way I do it now is to require some kind of whitespace after the SAN move text.
Diffstat (limited to 'chess-algebraic.el')
-rw-r--r--chess-algebraic.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/chess-algebraic.el b/chess-algebraic.el
index 1f76e1a..e9145e7 100644
--- a/chess-algebraic.el
+++ b/chess-algebraic.el
@@ -55,6 +55,9 @@ This regexp handles both long and short form.")
(defconst chess-algebraic-regexp-entire
(concat chess-algebraic-regexp "$"))
+(defconst chess-algebraic-regexp-ws
+ (concat chess-algebraic-regexp "\\s-"))
+
(chess-message-catalog 'english
'((clarify-piece . "Clarify piece to move by rank or file")
(could-not-clarify . "Could not determine which piece to use")