diff --git a/src/templates/src/include/timeline_item.html b/src/templates/src/include/timeline_item.html index a463e42..c0d0cde 100644 --- a/src/templates/src/include/timeline_item.html +++ b/src/templates/src/include/timeline_item.html @@ -37,8 +37,8 @@ {{/* content */}} {{ if .Description }} -
-
{{ .Description }}
+
+
{{ trim .Description }}
{{ if .TruncateDescription }}
{{ end }} diff --git a/src/templates/templates.go b/src/templates/templates.go index f0499a8..6cca05a 100644 --- a/src/templates/templates.go +++ b/src/templates/templates.go @@ -226,6 +226,9 @@ var HMNTemplateFuncs = template.FuncMap{ "cleancontrolchars": func(str template.HTML) template.HTML { return template.HTML(controlCharRegex.ReplaceAllString(string(str), "")) }, + "trim": func(str template.HTML) template.HTML { + return template.HTML(strings.TrimSpace(string(str))) + }, // NOTE(asaf): Template specific functions: "projectcarddata": func(project Project, classes string) ProjectCardData {