Skip to content

Commit

Permalink
Add a few tests for the parser
Browse files Browse the repository at this point in the history
  • Loading branch information
rberenguel committed Nov 10, 2024
1 parent ea0a077 commit f58f5a9
Show file tree
Hide file tree
Showing 12 changed files with 38,888 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const numMojis = [
];

const linkRegex = /\[(.*?)\]\((.*?)\)/;
const linkPlusRegex = /\[(.*?)\]\((.*?)\)\s+(.*)/;
const linkPlusRegex = /\[(.*?)\]\((.*?)\)(\s*.*)/;

function toTop(div) {
const allDivs = document.querySelectorAll("div");
Expand Down
1 change: 0 additions & 1 deletion lib/taskUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ function textToTaskObject(text) {
}
const linkMatch = cleaned.match(linkPlusRegex);
if (linkMatch) {
console.log(linkMatch);
obj.text = linkMatch[1] + (linkMatch[3] ?? "");
obj.link = linkMatch[2];
} else {
Expand Down
Loading

0 comments on commit f58f5a9

Please sign in to comment.