mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-03 07:19:38 +08:00
This commit is contained in:
parent
c26a6cf724
commit
08c7dc2a61
@ -1503,7 +1503,7 @@ export const linkMenu = (protyle: IProtyle, linkElement: HTMLElement, focusText
|
|||||||
// https://github.com/siyuan-note/siyuan/issues/6798
|
// https://github.com/siyuan-note/siyuan/issues/6798
|
||||||
let anchor = linkElement.textContent.replace(Constants.ZWSP, "");
|
let anchor = linkElement.textContent.replace(Constants.ZWSP, "");
|
||||||
if (!anchor && linkAddress) {
|
if (!anchor && linkAddress) {
|
||||||
anchor = linkAddress.replace("https://", "").replace("http://", "");
|
anchor = decodeURIComponent(linkAddress.replace("https://", "").replace("http://", ""));
|
||||||
if (anchor.length > Constants.SIZE_LINK_TEXT_MAX) {
|
if (anchor.length > Constants.SIZE_LINK_TEXT_MAX) {
|
||||||
anchor = anchor.substring(0, Constants.SIZE_LINK_TEXT_MAX) + "...";
|
anchor = anchor.substring(0, Constants.SIZE_LINK_TEXT_MAX) + "...";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user