From 5dd7df164e8ab391ead32ebe9686ccba9b04b576 Mon Sep 17 00:00:00 2001 From: skkiesel Date: Sat, 19 Jan 2019 08:38:19 -0500 Subject: [PATCH] This is my public shaming --- plugins/nerdepedia/nerdepedia.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/nerdepedia/nerdepedia.go b/plugins/nerdepedia/nerdepedia.go index cb7140e..ecf5bf9 100644 --- a/plugins/nerdepedia/nerdepedia.go +++ b/plugins/nerdepedia/nerdepedia.go @@ -59,15 +59,15 @@ func (p *NerdepediaPlugin) Message(message msg.Message) bool { for scanner.Scan() { line := scanner.Text() if description == "" { - index := strings.Index(line, linkPrefix) + index := strings.Index(line, descriptionPrefix) if index >= 0 { - description = html.UnescapeString(strings.TrimSuffix(strings.TrimPrefix(line, linkPrefix), closingTagSuffix)) + description = html.UnescapeString(strings.TrimSuffix(strings.TrimPrefix(line, descriptionPrefix), closingTagSuffix)) } } if link == "" { - index := strings.Index(line, descriptionPrefix) + index := strings.Index(line, linkPrefix) if index >= 0 { - link = strings.TrimSuffix(strings.TrimPrefix(line, descriptionPrefix), closingTagSuffix) + link = strings.TrimSuffix(strings.TrimPrefix(line, linkPrefix), closingTagSuffix) } }