My single.html looks like this
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ end }}
Let’s say I want to replace something with Regex and the replaceRe function is defined in a partial called regex1.html then this works:
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ partial "regex1.html" .Content }}
{{ end }}
Let’s say there is another Regex I want to apply on the .Content. Then something like that
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ partial "regex1.html" .Content }}
{{ partial "regex2.html" .Content }}
{{ end }}
prints the .Content two times. How to print the .Content only one time after applying first regex1 than regex2 on the whole content?