diff options
author | Dillon <dillonzq@outlook.com> | 2020-03-17 06:03:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-17 06:03:58 +0300 |
commit | f9dba2e36caef0c80666e79ce109621fd96ec9e8 (patch) | |
tree | 26ee4092775c49d3fe7afcf5aa96d1fbf245b291 /layouts/partials | |
parent | 80db7833963a0b43bcca86cecfb7eb83a6e1aa50 (diff) |
fix(fontawesome): keep spaces on both sides of the fontawesome i… (#178)
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/function/fontawesome.html | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/layouts/partials/function/fontawesome.html b/layouts/partials/function/fontawesome.html index 270aab5..d3a37ac 100644 --- a/layouts/partials/function/fontawesome.html +++ b/layouts/partials/function/fontawesome.html @@ -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 := ` $1` -}} +{{- $content := replaceRE $REin $REout . -}} + +{{- $REin = `(:\([\w- ]+?\):) ` -}} +{{- $REout = `$1 ` -}} +{{- $content = replaceRE $REin $REout . -}} + +{{- $REin = `:\(([\w- ]+?)\):` -}} +{{- $REout = `<i class="$1 fa-fw"></i>` -}} +{{- return replaceRE $REin $REout $content -}} |