Fix CRLF problems
All checks were successful
continuous-integration/drone/push Build is passing

It replaces a \r\n with \n now, and a \r with \n to also support
macOS line endings
This commit is contained in:
Julius 2022-06-28 16:37:10 +02:00
parent 9ca961d706
commit f2c235f8c7
Signed by: j00lz
GPG key ID: AF241B0AA237BBA2

View file

@ -236,6 +236,7 @@
let num = 0; let num = 0;
reader.onload = (evt) => { reader.onload = (evt) => {
let result = evt.target.result; let result = evt.target.result;
result = result.replace("\r\n", "\n").replace("\r", "\n");
for (let line of result.split("\n")) { for (let line of result.split("\n")) {
for (let llnr of line.split(",")) { for (let llnr of line.split(",")) {
if (llnr.length === 6 && !isNaN(llnr)) { if (llnr.length === 6 && !isNaN(llnr)) {