website/themes/LoveIt/layouts/partials/function/fraction.html

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 . -}}