diff options
author | Christian Muehlhaeuser <muesli@gmail.com> | 2019-07-23 20:50:39 +0200 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-07-23 19:50:39 +0100 |
commit | 54d96c79b5b9f3d5d47aed59729ae779968fbecb (patch) | |
tree | 3d74fa2aecf3a9c5a23a1ec0c7e66fca270216aa /modules/markup/html.go | |
parent | 2f75766532fbf30883c05e93ef01c19268216c45 (diff) | |
download | gitea-54d96c79b5b9f3d5d47aed59729ae779968fbecb.tar.gz gitea-54d96c79b5b9f3d5d47aed59729ae779968fbecb.zip |
Removed unnecessary conversions (#7557)
No need to convert to the same type.
Diffstat (limited to 'modules/markup/html.go')
-rw-r--r-- | modules/markup/html.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/markup/html.go b/modules/markup/html.go index 3e976929c7..825a41dd1f 100644 --- a/modules/markup/html.go +++ b/modules/markup/html.go @@ -438,7 +438,7 @@ func shortLinkProcessorFull(ctx *postProcessCtx, node *html.Node, noLink bool) { name += tail image := false - switch ext := filepath.Ext(string(link)); ext { + switch ext := filepath.Ext(link); ext { // fast path: empty string, ignore case "": break @@ -482,7 +482,7 @@ func shortLinkProcessorFull(ctx *postProcessCtx, node *html.Node, noLink bool) { title = props["alt"] } if title == "" { - title = path.Base(string(name)) + title = path.Base(name) } alt := props["alt"] if alt == "" { |