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

6 lines
244 B
HTML

{{- /* Ruby */ -}}
{{- /* [EN]^(English) -> <strong><ruby>EN<rt>English</rt></ruby></strong> */ -}}
{{- $REin := `\[(.+?)\]\^\((.+?)\)` -}}
{{- $REout := `<strong><ruby>$1<rt>$2</rt></ruby></strong>` -}}
{{- return replaceRE $REin $REout . -}}