mirror of
https://github.com/liamcottle/reticulum-meshchat.git
synced 2026-11-22 16:06:21 -05:00
optional closing backtick for links
This commit is contained in:
parent
846228b2b5
commit
1822f19ce4
1 changed files with 2 additions and 1 deletions
|
|
@ -74,7 +74,8 @@ class MicronParser {
|
|||
|
||||
// parse micron links
|
||||
// `[ ◈ The Future of RNode: A New Model`:/page/posts/2022_06_27.mu]
|
||||
line = line.replaceAll(/`\[(.*?)`(.*?)\]/g, function(match, linkText, linkUrl) {
|
||||
// `[Hangman`:/page/Games/Hangman.mu]`
|
||||
line = line.replaceAll(/`\[(.*?)`(.*?)\](?:`)?/g, function(match, linkText, linkUrl) {
|
||||
const url = MicronParser.formatNomadnetworkUrl(linkUrl);
|
||||
return `<a href="${url}" onclick="event.preventDefault(); onNodePageUrlClick('${linkUrl}')">${linkText}</a>`
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue