{{- $content := .Content -}} {{- $REin := `:\(([\w- ]+?)\):` -}} {{- $REout := `` -}} {{- $content = replaceRE $REin $REout $content -}} {{- $REin = `\[(.+?)\]\^\((.+?)\)` -}} {{- $REout = `$1$2` -}} {{- $content = replaceRE $REin $REout $content -}} {{- $REin = `\[return\]` -}} {{- $REout = printf "[%s]" (T "return") -}} {{- $content = replaceRE $REin $REout $content -}} {{- $REin = `<(h[23456]) (id=".+?")>` -}} {{- $REout = `<$1>` -}} {{- $content = replaceRE $REin $REout $content -}} {{- $REin = `<(.+) (id="fnref:.+?")>` -}} {{- $REout = `<$1>` -}} {{- $content = replaceRE $REin $REout $content -}} {{- $content | safeHTML -}}