m2.nz/themes/LoveIt/layouts/partials/function/fraction.html

6 lines
201 B
HTML
Raw Permalink Normal View History

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