diff options
author | Frédéric Guillot <fred@miniflux.net> | 2018-08-24 21:51:50 -0700 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2018-08-24 21:56:39 -0700 |
commit | dbcc5d8a972f4f169e9e2c0636450555a06152b9 (patch) | |
tree | 00d7ed89efc2ffdbfa4c602ba66b0c156d48cb0d /reader/rewrite/rewrite_functions.go | |
parent | 7f2612d9a67ccb97a9cee8c330b7445f11497d01 (diff) |
Use canonical imports
Diffstat (limited to 'reader/rewrite/rewrite_functions.go')
-rw-r--r-- | reader/rewrite/rewrite_functions.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/reader/rewrite/rewrite_functions.go b/reader/rewrite/rewrite_functions.go index 4348584..fee2a85 100644 --- a/reader/rewrite/rewrite_functions.go +++ b/reader/rewrite/rewrite_functions.go @@ -2,7 +2,7 @@ // Use of this source code is governed by the Apache 2.0 // license that can be found in the LICENSE file. -package rewrite +package rewrite // import "miniflux.app/reader/rewrite" import ( "fmt" @@ -14,7 +14,7 @@ import ( var ( youtubeRegex = regexp.MustCompile(`youtube\.com/watch\?v=(.*)`) - imgRegex = regexp.MustCompile(`<img [^>]+>`) + imgRegex = regexp.MustCompile(`<img [^>]+>`) ) func addImageTitle(entryURL, entryContent string) string { @@ -72,13 +72,13 @@ func addDynamicImage(entryURL, entryContent string) string { changed = true if img.Is("img") { - img.SetAttr("src",srcAttr) + img.SetAttr("src", srcAttr) } else { altAttr := img.AttrOr("alt", "") img.ReplaceWithHtml(`<img src="` + srcAttr + `" alt="` + altAttr + `"/>`) } - break; + break } } }) |