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

github.com/reuixiy/hugo-theme-meme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMakise Von <v.makise@foxmail.com>2021-11-17 17:00:02 +0300
committerGitHub <noreply@github.com>2021-11-17 17:00:02 +0300
commit27ba8bbd6489226679c94548fb1429b71771fba8 (patch)
treee91776095b82e00b63bc283a6137ee36b6e9ec4f
parent72212b2dd61224aeacf84d0f327ed5291e7bbc9b (diff)
fix: drop cap to the identical paras only once (#356)
``` // text xxx xxx // before Xxx Xxx // after Xxx xxx ```
-rw-r--r--layouts/partials/utils/content.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/utils/content.html b/layouts/partials/utils/content.html
index 0819137..a1bf70b 100644
--- a/layouts/partials/utils/content.html
+++ b/layouts/partials/utils/content.html
@@ -52,7 +52,7 @@
{{- $regexReplacementDropCap := `$1 style="text-indent:0"$2<span class="drop-cap">$3</span>$4` -}}
{{- $firstParagraphOld := (delimit (findRE $regexPatternDropCap $Content 1) " ") -}}
{{- $firstParagraphNew := (replaceRE $regexPatternDropCap $regexReplacementDropCap $firstParagraphOld) -}}
- {{- $Content = replace $Content $firstParagraphOld $firstParagraphNew -}}
+ {{- $Content = replace $Content $firstParagraphOld $firstParagraphNew 1 -}}
{{- end -}}
<!-- Drop Cap After `<hr />` -->