Add titles in markdown links

This commit is contained in:
Bruno
2024-10-08 02:55:19 +01:00
parent 90277e15b4
commit bbd03d413b

View File

@@ -207,11 +207,14 @@
link(token) {
// external links
if (token.href.startsWith('http://') || token.href.startsWith('https://')) {
return '<a href="' + token.href + '" target="_blank">' + token.text + '</a>';
return '<a href="' + token.href + '" title="' + (token.title ?? '') + '" target="_blank">' +
token
.text + '</a>';
}
// internal links
return '<a href="" wire:click.prevent="openFilePath(\'' + token.href + '\')">' + token.text +
return '<a href="" wire:click.prevent="openFilePath(\'' + token.href + '\')" title="' + (token
.title ?? '') + '">' + token.text +
'</a>';
},
listitem(token) {