Skip to content

Commit

Permalink
fix: regex of indent again
Browse files Browse the repository at this point in the history
  • Loading branch information
reuixiy committed Jan 16, 2020
1 parent d49e3a6 commit 09f4e53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions layouts/partials/components/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,14 @@
{{- end -}}
{{- $Content := .Scratch.Get "Content" -}}
{{- if not $enableDropCapAfterHr -}}
{{- $regex := `((</h[1-6]>|<hr>|<hr />)\n<p)(>[^<])` -}}
{{- $regex := `((</h[1-6]>|<hr>|<hr />)\n(<blockquote>\n)?<p)(>[^<])` -}}
{{- $.Scratch.Set "regex" $regex -}}
{{- else -}}
{{- $regex := `((</h[1-6]>)\n<p)(>[^<])` -}}
{{- $regex := `((</h[1-6]>)\n(<blockquote>\n)?<p)(>[^<])` -}}
{{- $.Scratch.Set "regex" $regex -}}
{{- end -}}
{{- $regex := .Scratch.Get "regex" -}}
{{- $replacement := `$1 style="text-indent:0"$3` -}}
{{- $replacement := `$1 style="text-indent:0"$4` -}}
{{- $Content := $Content | replaceRE $regex $replacement | safeHTML -}}
{{- .Scratch.Set "Content" $Content -}}
{{- end -}}
Expand Down

0 comments on commit 09f4e53

Please sign in to comment.