From 575c2c9b6386ab0f1371b25f5730b719aa108b30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhani=20Krekel=C3=A4?= Date: Mon, 11 Jan 2021 01:30:01 +0200 Subject: [PATCH] Add final line ending to downloaded moves --- takhta.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/takhta.html b/takhta.html index a777cb0..5da50b7 100644 --- a/takhta.html +++ b/takhta.html @@ -760,7 +760,8 @@ file.push(line); } - let contents = encodeURIComponent(file.join("\n")); + // Include final \n since we're doing unix-style line endings (instead of line separators) + let contents = encodeURIComponent(file.join("\n") + "\n"); link.setAttribute("href", "data:text/plain;charset=utf-8," + contents); link.click();