Handle slightly unstandard PGN promotion syntax.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 13 Nov 2014 23:55:17 +0000 (00:55 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 13 Nov 2014 23:55:17 +0000 (00:55 +0100)
Board.pm

index a867c74..655b7f1 100644 (file)
--- a/Board.pm
+++ b/Board.pm
@@ -170,7 +170,7 @@ sub parse_pretty_move {
 
        # Parse promo
        my $promo;
-       if ($move =~ s/=([QRNB])$//) {
+       if ($move =~ s/=?([QRNB])$//) {
                $promo = $1;
        }