Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2023-12-28 23:46:29 +08:00
commit 0c885cf9ff
4 changed files with 10 additions and 6 deletions

View file

@ -1852,7 +1852,7 @@ export class WYSIWYG {
if (aElement && !event.altKey) {
event.stopPropagation();
event.preventDefault();
const linkAddress = Lute.UnEscapeHTMLStr(aLink);
let linkAddress = Lute.UnEscapeHTMLStr(aLink);
/// #if MOBILE
openByMobile(linkAddress);
/// #else
@ -1882,6 +1882,10 @@ export class WYSIWYG {
}
} else if (linkAddress) {
/// #if !BROWSER
if (0 > linkAddress.indexOf("://")) {
// Support click to open hyperlinks like `www.foo.com` https://github.com/siyuan-note/siyuan/issues/9986
linkAddress = `https://${linkAddress}`;
}
shell.openExternal(linkAddress).catch((e) => {
showMessage(e);
});

File diff suppressed because one or more lines are too long