Fixed pre-line issue in chrome
This commit is contained in:
parent
b995df4533
commit
4c1daae5e1
|
@ -37,8 +37,8 @@
|
|||
{{/* content */}}
|
||||
|
||||
{{ if .Description }}
|
||||
<div class="mt3 overflow-hidden relative pre-line {{ if .TruncateDescription }}mh-5{{ end }}">
|
||||
<div class="post-content">{{ .Description }}</div>
|
||||
<div class="mt3 overflow-hidden relative {{ if .TruncateDescription }}mh-5{{ end }}">
|
||||
<div class="post-content pre-line">{{ trim .Description }}</div>
|
||||
{{ if .TruncateDescription }}
|
||||
<div class="excerpt-fade absolute w-100 h4 bottom-0 z-999"></div>
|
||||
{{ end }}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue