]> code.delx.au - gnu-emacs-elpa/commitdiff
Instead of using `read' to parse a PGN tag string, just clip off the leading
authorJohn Wiegley <johnw@newartisans.com>
Mon, 1 Sep 2008 07:47:56 +0000 (03:47 -0400)
committerJohn Wiegley <johnw@newartisans.com>
Mon, 1 Sep 2008 09:05:20 +0000 (05:05 -0400)
and trailing quotes.

chess-pgn.el

index 6417c26afb27d958f767960c2d437e387495031f..4ccdb643e0141172e327b366d8a79564fc4fa0d4 100644 (file)
@@ -97,7 +97,8 @@ Optionally use the supplied STRING instead of the current buffer."
        (chess-game-set-tags game nil)
        (while (looking-at "\\[\\(\\S-+\\)\\s-+\\(\".*?\"\\)\\][ \t\n\r]+")
          (chess-game-set-tag game (match-string-no-properties 1)
-                             (read (match-string-no-properties 2)))
+                             (let ((str (match-string-no-properties 2)))
+                               (substring str 0 (1- (length str)))))
          (goto-char (match-end 0)))
        (let ((fen (chess-game-tag game "FEN")))
          (if fen