Skip to content

Commit

Permalink
Added a line break removal function
Browse files Browse the repository at this point in the history
  • Loading branch information
colton22 authored and coryb committed Dec 2, 2019
1 parent db53622 commit 9cbd993
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jiracli/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ func TemplateProcessor() *template.Template {
"color": func(color string) string {
return ansi.ColorCode(color)
},
"remLineBreak": func(content string) string {
return strings.Replace(strings.Replace(content,string('\r'),string(' '),-1),string('\n'),string(' '),-1)
},
"regReplace": func(search string, replace string, content string) string {
re := regexp.MustCompile(search)
return re.ReplaceAllString(content, replace)
Expand Down

0 comments on commit 9cbd993

Please sign in to comment.