This commit is contained in:
Maciej Caderek
2022-01-19 23:23:12 +01:00
parent 5d750f1a5b
commit 2a2d1dbbca
8 changed files with 44 additions and 33 deletions

View File

@@ -24,7 +24,7 @@ const cleanPGN = (pgn: string) => {
const [_, moves] = game.pgn().split("\n\n");
const header = Object.entries(game.header())
.filter(([key]) => PGN_KEYS.includes(key))
.filter(([key, val]) => PGN_KEYS.includes(key) && val !== "?")
.map(([key, val]) => `[${key} "${val}"]`)
.sort()
.join("\n");