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

github.com/darshanbaral/aafu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarshan Baral <darshanbaral@gmail.com>2020-04-05 09:28:55 +0300
committerDarshan Baral <darshanbaral@gmail.com>2020-04-05 09:28:55 +0300
commit55194976472bbe03e5baad5504541e958eba67fa (patch)
tree28d95f87441d3f7fe30d0e0d9d4ae633475b9846
parent5a6418d18307d7d8ea5c5c591c387c8553fea9bf (diff)
fixed regex to handle icons
-rw-r--r--layouts/partials/meta.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html
index 3c2fdb7..f61be28 100644
--- a/layouts/partials/meta.html
+++ b/layouts/partials/meta.html
@@ -11,7 +11,8 @@
{{- if .Site.Params.favicons.use }}
{{- $metas := .Site.Params.favicons.metas }}
{{- range (split $metas "\n") }}
-{{- $ll := (index (findRE "^href=\"(.+)\"$" .) 0) | relURL }}
-{{- replaceRE "^href=\"(.+)\"$" `$ll` . | safeHTML }}
+{{- $original := index (findRE `href=\"(.*)\"[ |>]` .) 0 }}
+{{ $processed := replaceRE `href|\"|>|=` `` $original | relURL }}
+{{ replaceRE `(href=\")(.*)(\"[ |>])` (print `$1` $processed `$3`) . | safeHTML }}
{{- end }}
{{ end -}}