Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
fix(fontawesome): keep spaces on both sides of the fontawesome i… (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq authored Mar 17, 2020
1 parent 80db783 commit f9dba2e
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions layouts/partials/function/fontawesome.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{{- /* Font Awesome */ -}}
{{- /* :(far fa-circle): -> <i class="far fa-circle fa-fw"></i> */ -}}
{{- $REin := `:\(([\w- ]+?)\):` -}}
{{- $REout := `<i class="$1 fa-fw"></i>` -}}
{{- return replaceRE $REin $REout . -}}

{{- $REin := ` (:\([\w- ]+?\):)` -}}
{{- $REout := `&nbsp;$1` -}}
{{- $content := replaceRE $REin $REout . -}}

{{- $REin = `(:\([\w- ]+?\):) ` -}}
{{- $REout = `$1&nbsp;` -}}
{{- $content = replaceRE $REin $REout . -}}

{{- $REin = `:\(([\w- ]+?)\):` -}}
{{- $REout = `<i class="$1 fa-fw"></i>` -}}
{{- return replaceRE $REin $REout $content -}}

0 comments on commit f9dba2e

Please sign in to comment.