Commit 11c93bd 1 parent d17176e commit 11c93bd Copy full SHA for 11c93bd
File tree 2 files changed +10
-3
lines changed
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 7
7
)
8
8
9
9
const (
10
- Version string = "0.7.12 "
10
+ Version string = "0.7.13 "
11
11
)
12
12
13
13
var VersionCmd = & cobra.Command {
Original file line number Diff line number Diff line change @@ -124,8 +124,15 @@ func GetArtworkHTMLCaption(artwork *types.Artwork) string {
124
124
caption += "\n " + "<b>Author:</b> " + common .EscapeHTML (artwork .Artist .Name )
125
125
if artwork .Description != "" {
126
126
desc := artwork .Description
127
- if len (artwork .Description ) > 3583 {
128
- desc = artwork .Description [:3580 ] + "..."
127
+ if len (artwork .Description ) > 500 {
128
+ var n , i int
129
+ for i = range desc {
130
+ if n >= 500 {
131
+ break
132
+ }
133
+ n ++
134
+ }
135
+ desc = desc [:i ] + "..."
129
136
}
130
137
caption += fmt .Sprintf ("\n \n <blockquote expandable=true>%s</blockquote>" , common .EscapeHTML (desc ))
131
138
}
You can’t perform that action at this time.
0 commit comments