aboutsummaryrefslogtreecommitdiff
path: root/layouts/shortcodes/math.html
blob: a42988830eb12352595c5cb33af82efbed8a284a (plain)
1
2
3
4
5
6
7
8
{{ if or (hasPrefix .Inner "\n") (hasPrefix .Inner "<p>") }}
    $$
    {{ $inner := trim (.Inner | htmlUnescape) "$\n " }}
    {{- replace $inner "\n" " " -}}
    $$
{{ else }}
    ${{- trim (.Inner | htmlUnescape) "$\n " -}}$
{{ end }}