Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
abcvav committed Nov 20, 2023
1 parent 77237a4 commit 342c505
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO convert to ts
async function getLinkTitle(link) {
return await fetch(link, {
headers: {
Expand All @@ -23,7 +24,9 @@ async function getLinkTitle(link) {

function isMarkdownURL(content) {
let markdownURL = content.match(/\[.*?\]\((.*)?\)/);
return markdownURL && markdownURL[1] ? markdownURL[1] : null;
return markdownURL && markdownURL[0] == markdownURL[1]
? markdownURL[1]
: null;
}

async function main() {
Expand Down

0 comments on commit 342c505

Please sign in to comment.