Link wikilinks to wiki clients

This commit is contained in:
dtonon
2024-07-25 16:38:54 +02:00
parent 6aef19e6fa
commit 42e37db1e7
2 changed files with 12 additions and 1 deletions

View File

@@ -24,7 +24,7 @@ func parseWikilinks(asciidoc string) string {
}
targetFormatted := strings.ToLower(strings.ReplaceAll(target, " ", "-"))
return fmt.Sprintf("link:/wiki/%s[%s]", targetFormatted, display)
return fmt.Sprintf("[.bg-lavender.dark:prose:text-neutral-50.dark:text-neutral-50.dark:bg-garnet.px-1]#%s# [.wikilinks]#(link:https://wikistr.com/%s[Wikistr], link:https://wikifreedia.xyz/%s[Wikifreedia])#", display, targetFormatted, targetFormatted)
}
// Use regex ReplaceAllStringFunc with the replacement function