Skip to content

Commit

Permalink
fix: missing div tag in dark mode's regex
Browse files Browse the repository at this point in the history
  • Loading branch information
reuixiy committed Feb 25, 2020
1 parent 4eb0408 commit c1cda8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/utils/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
{{- if .Site.Params.enableHighlight -}}
{{- if and .Site.Params.enableDarkMode (eq .Site.Params.defaultTheme "dark") -}}
{{- $Content := .Scratch.Get "Content" -}}
{{- $regexPatternDarkmode := `(<pre class=")(chroma)(">)` -}}
{{- $regexPatternDarkmode := `(<(div|pre) class=")chroma(">)` -}}
{{- $regexReplacementDarkmode := `${1}chroma-dark${3}` -}}
{{- $Content := $Content | replaceRE $regexPatternDarkmode $regexReplacementDarkmode | safeHTML -}}
{{- .Scratch.Set "Content" $Content -}}
Expand Down

0 comments on commit c1cda8b

Please sign in to comment.