From f9dba2e36caef0c80666e79ce109621fd96ec9e8 Mon Sep 17 00:00:00 2001 From: Dillon Date: Tue, 17 Mar 2020 11:03:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(fontawesome):=20keep=20spaces=20on=20both?= =?UTF-8?q?=20sides=20of=20the=20fontawesome=20i=E2=80=A6=20(#178)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/partials/function/fontawesome.html | 15 ++++++++++++--- 1 file 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): -> */ -}} -{{- $REin := `:\(([\w- ]+?)\):` -}} -{{- $REout := `` -}} -{{- return replaceRE $REin $REout . -}} + +{{- $REin := ` (:\([\w- ]+?\):)` -}} +{{- $REout := ` $1` -}} +{{- $content := replaceRE $REin $REout . -}} + +{{- $REin = `(:\([\w- ]+?\):) ` -}} +{{- $REout = `$1 ` -}} +{{- $content = replaceRE $REin $REout . -}} + +{{- $REin = `:\(([\w- ]+?)\):` -}} +{{- $REout = `` -}} +{{- return replaceRE $REin $REout $content -}}