Skip to content

Commit

Permalink
Merge pull request #135 from flickmatch/changeURL
Browse files Browse the repository at this point in the history
parse zero width space characters from js.
  • Loading branch information
abhishekFlick authored Feb 3, 2024
2 parents 08695da + 1b25114 commit d546bd1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions whatsapp-js/src/parseUsualQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,15 @@ export function parseMessage(message) {
}

const removeIndex = (line) => {
line = line.replace(/[\u200B-\u200D\uFEFF]/g, '');
var nameStartIdx = line.search("[.]");
if (nameStartIdx == -1 || nameStartIdx >= line.length) {
console.log("Not processing: " + line);
return "";
}
if (line.trim() === '') {
return "";
}
return line.substring(nameStartIdx + 1).trim();
};

Expand Down

0 comments on commit d546bd1

Please sign in to comment.