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,9 @@
{{- /* Checkbox unchecked */ -}}
{{- $REin := `<input disabled="" type="checkbox">` -}}
{{- $REout := `<i class="far fa-check-square fa-fw"></i>` -}}
{{- $content := replaceRE $REin $REout . -}}
{{- /* Checkbox checked */ -}}
{{- $REin = `<input checked="" disabled="" type="checkbox">` -}}
{{- $REout = `<i class="far fa-square fa-fw"></i>` -}}
{{- return replaceRE $REin $REout $content -}}