Skip to content

Commit

Permalink
feat(monaco-editor): 在新页签/新窗口中打开编辑器 | Open editor in new tab/new window.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuoqiu-Yingyi committed Jul 19, 2023
1 parent de8a6eb commit 2d2ae77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -467,14 +467,14 @@ export default class WebviewPlugin extends siyuan.Plugin {
case "a":
meta.valid = true;
meta.enabled = targets.hyperlink.other.enable;
meta.href = (element as HTMLAnchorElement).href;
meta.href = (element as HTMLAnchorElement).href || "";
meta.title = element.title || element.innerText;
break;
case "span":
if (/\ba\b/.test(element.dataset.type)) {
meta.valid = true;
meta.enabled = targets.hyperlink.editor.enable;
meta.href = element.dataset.href;
meta.href = element.dataset.href || "";
meta.title = element.dataset.title || element.innerText;
}
break;
Expand Down

0 comments on commit 2d2ae77

Please sign in to comment.