Commit Diff
Commit:
4852f411b4f51da99a0ac2323e9c160d2bae4a05
Date:
Thu Dec 2 14:50:26 2021
UTC
Message
heuristic for links and more logging for now
--- main.go
+++ main.go
@@ -26,7 +26,7 @@ var (
tooLongRe = regexp.MustCompile(`full message at (https://libera.ems.host/.*)[)]`)
- httplink = regexp.MustCompile(`https?://[^\s]+`)
+ httplink = regexp.MustCompile(`https?://[^\s)]+`)
)
func matrix2gemini(conn *irc.Conn, line *irc.Line) {
@@ -142,6 +142,7 @@ func pagetitle(conn *irc.Conn, line *irc.Line) {
}
func pagetitle(conn *irc.Conn, line *irc.Line) {
+ log.Println("text is", line.Text())
matches := httplink.FindAllString(line.Text(), -1)
for _, link := range matches {
Omar Polo