Skip to content

Commit

Permalink
fix: regex of compatibleWithLaTeX
Browse files Browse the repository at this point in the history
  • Loading branch information
reuixiy authored Jan 19, 2020
1 parent 67bf0f5 commit b2bed6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/components/markdownify.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{{- $Content := $Deliver.Scratch.Get "Content" -}}
{{- if $Deliver.Site.Params.compatibleWithLaTeX -}}
{{- if or ($Deliver.Params.katex | default $Deliver.Site.Params.enableKaTeX) ($Deliver.Params.mathjax | default $Deliver.Site.Params.enableMathJax) -}}
{{- $regexLaTeX := `([^\$]|\n)\$(.+)\$` -}}
{{- $regexLaTeX := `([^\$]|\n)\$([^\$]+)\$` -}}
{{- $replacementLaTeX := `$1<span>$$${2}$$</span>` -}}
{{- $Content := $Content | replaceRE $regexLaTeX $replacementLaTeX -}}

Expand Down

0 comments on commit b2bed6b

Please sign in to comment.