mirror of
https://github.com/brufdev/many-notes.git
synced 2026-01-25 04:18:51 -06:00
Add titles in markdown links
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user