ignore empty lines
This commit is contained in:
parent
bb90e7458b
commit
90200750cc
1 changed files with 2 additions and 2 deletions
4
index.js
4
index.js
|
@ -56,8 +56,8 @@ app.get("/indexes/:project(\\w+)", (req, res) => {
|
||||||
app.use("/updates", express.text());
|
app.use("/updates", express.text());
|
||||||
|
|
||||||
function diff(current, checked) {
|
function diff(current, checked) {
|
||||||
let lines_current = current.split('\n').map(l => l.trim());
|
let lines_current = current.split('\n').map(l => l.trim()).filter(l => l != "");
|
||||||
let lines_checked = checked.split('\n').map(l => l.trim());
|
let lines_checked = checked.split('\n').map(l => l.trim()).filter(l => l != "");
|
||||||
let filenames_checked = lines_checked.map(l => l.split(" ")[0]);
|
let filenames_checked = lines_checked.map(l => l.split(" ")[0]);
|
||||||
|
|
||||||
console.log(lines_current, lines_checked);
|
console.log(lines_current, lines_checked);
|
||||||
|
|
Loading…
Reference in a new issue