Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDillon <dillonzq@outlook.com>2020-03-17 06:03:58 +0300
committerGitHub <noreply@github.com>2020-03-17 06:03:58 +0300
commitf9dba2e36caef0c80666e79ce109621fd96ec9e8 (patch)
tree26ee4092775c49d3fe7afcf5aa96d1fbf245b291 /layouts
parent80db7833963a0b43bcca86cecfb7eb83a6e1aa50 (diff)
fix(fontawesome): keep spaces on both sides of the fontawesome i… (#178)
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/function/fontawesome.html15
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 := `&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 -}}