From: Benjamin Auder <benjamin.auder@somewhere>
Date: Tue, 4 Dec 2018 23:06:07 +0000 (+0100)
Subject: Add final FEN information to the PGN
X-Git-Url: https://git.auder.net/doc/html/app_dev.php/pieces/current/git-favicon.png?a=commitdiff_plain;h=04449c9757e5a39628dcefccdc7be5f95c068fcd;p=vchess.git

Add final FEN information to the PGN
---

diff --git a/public/javascripts/base_rules.js b/public/javascripts/base_rules.js
index 07ff7150..79301f95 100644
--- a/public/javascripts/base_rules.js
+++ b/public/javascripts/base_rules.js
@@ -1142,7 +1142,8 @@ class ChessRules
 		pgn += '[Date "' + d.getFullYear() + '-' + (d.getMonth()+1) + '-' + d.getDate() + '"]<br>';
 		pgn += '[White "' + (mycolor=='w'?'Myself':opponent) + '"]<br>';
 		pgn += '[Black "' + (mycolor=='b'?'Myself':opponent) + '"]<br>';
-		pgn += '[Fen "' + fenStart + '"]<br>';
+		pgn += '[FenStart "' + fenStart + '"]<br>';
+		pgn += '[Fen "' + this.getFen() + '"]<br>';
 		pgn += '[Result "' + score + '"]<br><br>';
 
 		// Standard PGN