mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-10-25 04:37:41 +00:00
Add /user-list page
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"html"
|
||||
"regexp"
|
||||
"strings"
|
||||
"unicode"
|
||||
)
|
||||
@@ -103,6 +104,17 @@ func getTextNode(input *bytes.Buffer) string {
|
||||
return textNodeBuffer.String()
|
||||
}
|
||||
|
||||
var (
|
||||
dangerousSymbols = "<>{}|\\^[]`,()"
|
||||
reLink = regexp.MustCompile(fmt.Sprintf(`[^[]{0,2}((https|http|gemini|gopher)://[^%[1]s]+)|(mailto:[^%[1]s]+)[^]]{0,2}`, dangerousSymbols))
|
||||
)
|
||||
|
||||
// TODO:
|
||||
func doRegexpStuff(input string) string {
|
||||
reLink.ReplaceAllString(input, "[[$1]]")
|
||||
return ""
|
||||
}
|
||||
|
||||
func ParagraphToHtml(hyphaName, input string) string {
|
||||
var (
|
||||
p = bytes.NewBufferString(input)
|
||||
|
||||
Reference in New Issue
Block a user