all repos — honk @ 7dcce1af1755cd6190279b2206ddd7918115ce7c

my fork of honk

stick with go 1.11 compat for now
Ted Unangst tedu@tedunangst.com
Wed, 05 Jun 2019 03:55:27 -0400
commit

7dcce1af1755cd6190279b2206ddd7918115ce7c

parent

e8bbd47228660e8a5628d0879a645f0ddd7bc217

1 files changed, 3 insertions(+), 3 deletions(-)

jump to
M hoot.gohoot.go

@@ -21,7 +21,7 @@ url := hoot[5:]

if url[0] == ' ' { url = url[1:] } - url = strings.ReplaceAll(url, "mobile.twitter.com", "twitter.com") + url = strings.Replace(url, "mobile.twitter.com", "twitter.com", -1) log.Printf("hooterizing %s", url) req, err := http.NewRequest("GET", url, nil) if err != nil {

@@ -72,8 +72,8 @@ if author != wanted {

continue } text := htfilter.TextOnly(div) - text = strings.ReplaceAll(text, "\n", " ") - text = strings.ReplaceAll(text, "pic.twitter.com", "https://pic.twitter.com") + text = strings.Replace(text, "\n", " ", -1) + text = strings.Replace(text, "pic.twitter.com", "https://pic.twitter.com", -1) fmt.Fprintf(&buf, "> @%s: %s\n", author, text) }