mirror of
https://github.com/Threnklyn/jira.git
synced 2026-05-19 12:43:30 +02:00
[#159] fix slice bounds out of range error in abbrev template function
This commit is contained in:
@@ -158,7 +158,7 @@ func TemplateProcessor() *template.Template {
|
||||
return strings.Join(vals, sep)
|
||||
},
|
||||
"abbrev": func(max int, content string) string {
|
||||
if len(content) > max {
|
||||
if len(content) > max && max > 2 {
|
||||
var buffer bytes.Buffer
|
||||
buffer.WriteString(content[:max-3])
|
||||
buffer.WriteString("...")
|
||||
|
||||
Reference in New Issue
Block a user