feat(toc): support fontawesome and ruby in TOC

This commit is contained in:
Dillon
2020-02-22 00:34:44 +08:00
parent 4e6fe224cc
commit c8fee1783a
8 changed files with 58 additions and 39 deletions

View File

@@ -0,0 +1,5 @@
{{- /* 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 . -}}