mirror of
https://github.com/zadam/trilium.git
synced 2025-01-31 19:39:59 +08:00
fix parsing links without any attributes after href
This commit is contained in:
parent
de971d5db5
commit
f063d12d07
1 changed files with 3 additions and 1 deletions
|
@ -81,9 +81,11 @@ function html2notecase(contents, note) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const linkMatch = /^<a[^>]+?href="([^"]+?)"[^>]+?>([^<]+?)<\/a>/.exec(curContent);
|
const linkMatch = /^<a[^>]+?href="([^"]+?)"[^>]*?>([^<]+?)<\/a>/.exec(curContent);
|
||||||
|
|
||||||
if (linkMatch !== null) {
|
if (linkMatch !== null) {
|
||||||
|
console.log("matched link: ", linkMatch);
|
||||||
|
|
||||||
const targetUrl = linkMatch[1];
|
const targetUrl = linkMatch[1];
|
||||||
const linkText = linkMatch[2];
|
const linkText = linkMatch[2];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue