2020-02-03 15:56:49 +01:00
|
|
|
{{- /* Font Awesome */ -}}
|
|
|
|
{{- /* :(far fa-circle): -> <i class="far fa-circle fa-fw"></i> */ -}}
|
2020-02-03 04:46:30 +01:00
|
|
|
{{- $REin := `:\(([\w- ]+?)\):` -}}
|
|
|
|
{{- $REout := `<i class="$1 fa-fw"></i>` -}}
|
|
|
|
{{- $content := replaceRE $REin $REout . -}}
|
|
|
|
|
2020-02-03 15:56:49 +01:00
|
|
|
{{- /* Ruby */ -}}
|
|
|
|
{{- /* [EN]^(English) -> <strong><ruby>EN<rt>English</rt></ruby></strong> */ -}}
|
2020-02-03 04:46:30 +01:00
|
|
|
{{- $REin = `\[(.+?)\]\^\((.+?)\)` -}}
|
|
|
|
{{- $REout = `<strong><ruby>$1<rt>$2</rt></ruby></strong>` -}}
|
|
|
|
{{- $content = replaceRE $REin $REout $content -}}
|
|
|
|
|
2020-02-03 15:56:49 +01:00
|
|
|
{{- /* Checkbox */ -}}
|
|
|
|
{{- $REin = `<input disabled="" type="checkbox">` -}}
|
|
|
|
{{- $REout = `<i class="far fa-check-square fa-fw"></i>` -}}
|
|
|
|
{{- $content = replaceRE $REin $REout $content -}}
|
|
|
|
|
|
|
|
{{- /* Checkbox checked */ -}}
|
|
|
|
{{- $REin = `<input checked="" disabled="" type="checkbox">` -}}
|
|
|
|
{{- $REout = `<i class="far fa-square fa-fw"></i>` -}}
|
|
|
|
{{- $content = replaceRE $REin $REout $content -}}
|
|
|
|
|
|
|
|
{{- /* Fix <sup>[return]</sup> */ -}}
|
2020-02-03 04:46:30 +01:00
|
|
|
{{- $REin = `<sup>\[return\]</sup>` -}}
|
|
|
|
{{- $REout = `↩︎` -}}
|
|
|
|
{{- $content = replaceRE $REin $REout $content -}}
|
|
|
|
|
2020-02-03 15:56:49 +01:00
|
|
|
{{- /* Dummy target */ -}}
|
2020-02-03 04:46:30 +01:00
|
|
|
{{- $REin = `<(h[23456]) (id=".+?")>` -}}
|
|
|
|
{{- $REout = `<a class="post-dummy-target" $2></a><$1>` -}}
|
|
|
|
{{- $content = replaceRE $REin $REout $content -}}
|
|
|
|
|
2020-02-03 15:56:49 +01:00
|
|
|
{{- /* Dummy target */ -}}
|
2020-02-03 04:46:30 +01:00
|
|
|
{{- $REin = `<(.+) (id="fnref:.+?")>` -}}
|
|
|
|
{{- $REout = `<a class="post-dummy-target" $2></a><$1>` -}}
|
|
|
|
{{- $content = replaceRE $REin $REout $content -}}
|
|
|
|
|
2020-02-03 15:56:49 +01:00
|
|
|
{{- /* Dummy target */ -}}
|
2020-02-03 04:46:30 +01:00
|
|
|
{{- $REin = `<li (id="fn:.+?")(.*?)>\s?<p>` -}}
|
|
|
|
{{- $REout = `<li $2><p><a class="post-dummy-target" $1></a>` -}}
|
2020-02-03 15:56:49 +01:00
|
|
|
{{- $content = replaceRE $REin $REout $content -}}
|
2020-02-03 04:46:30 +01:00
|
|
|
|
2020-02-06 17:10:00 +01:00
|
|
|
{{- return $content -}}
|