mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
84d48f37dc
* feat(syntax): add fraction syntax * docs: add remind for Hugo extended version
6 lines
201 B
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 . -}}
|