File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ var tagCharsReplacer = strings.NewReplacer(
7676// 获取作品的 HTML 格式描述, 已转义
7777func GetArtworkHTMLCaption (artwork * types.Artwork ) string {
7878 caption := fmt .Sprintf ("<a href=\" %s\" ><b>%s</b></a>" , artwork .SourceURL , common .EscapeHTML (artwork .Title ))
79- caption += " \n <b>Author: </b> " + common .EscapeHTML (artwork .Artist .Name )
79+ caption += fmt . Sprintf ( " \n Author: <b>%s </b>" , common .EscapeHTML (artwork .Artist .Name ) )
8080 if artwork .Description != "" {
8181 desc := artwork .Description
8282 if len (artwork .Description ) > 500 {
@@ -100,11 +100,12 @@ func GetArtworkHTMLCaption(artwork *types.Artwork) string {
100100 tags += "#" + strings .TrimSpace (common .EscapeHTML (tag )) + " "
101101 }
102102 caption += fmt .Sprintf ("\n <blockquote expandable=true>%s</blockquote>\n " , tags )
103- if ChannelChatID .Username != "" {
103+ posted := ChannelChatID .Username != "" && artwork .ID != ""
104+ if posted {
104105 caption += common .EscapeHTML (ChannelChatID .Username )
105106 }
106107 if artwork .ID != "" && config .Cfg .API .SiteURL != "" {
107- if ChannelChatID . Username != "" {
108+ if posted {
108109 caption += " | "
109110 }
110111 caption += fmt .Sprintf ("<a href=\" %s/artwork/%s\" >在网站查看</a>" , config .Cfg .API .SiteURL , artwork .ID )
You can’t perform that action at this time.
0 commit comments