This commit is contained in:
Jeremy Ruston 2024-04-25 22:09:39 +08:00 committed by GitHub
commit 8617856a8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 7 deletions

View File

@ -0,0 +1,13 @@
title: $:/core/macros/shortcuts/prettylink
tags: $:/tags/Macro
\define x-tm-prettylink-internal(to,text)
<$link to=<<__to__>>><$text text=<<__text__>>/></$link>
\end
\define tm-prettylink-internal(to,text)
<$button>
<$action-navigate $to=<<__to__>>/>
<$text text=<<__text__>>/>
</$button>
\end

View File

@ -49,13 +49,12 @@ exports.parse = function() {
}];
} else {
return [{
type: "link",
attributes: {
to: {type: "string", value: link}
},
children: [{
type: "text", text: text
}]
type: "macrocall",
name: "tm-prettylink-internal",
params: [
{name: "to", value: link},
{name: "text", value: text}
]
}];
}
};