m2.nz/themes/LoveIt/layouts/partials/function/fraction.html
2022-05-08 18:50:17 +12:00

6 lines
201 B
HTML

{{- /* Fraction */ -}}
{{- /* [A]/[B] -> <sup>A</sup>/<sub>B</sub> */ -}}
{{- $REin := `\[(.+?)\]/\[(.+?)\]` -}}
{{- $REout := `<sup>$1</sup>/<sub>$2</sub>` -}}
{{- return replaceRE $REin $REout . -}}