Skip to content

Commit

Permalink
fix: regex of emphasis point
Browse files Browse the repository at this point in the history
exclude backtick quotes (`)
  • Loading branch information
reuixiy committed Nov 6, 2019
1 parent 5beb752 commit 6babe81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<!-- New Markdown Syntax: Emphasis Point `..text..` -->
{{- $Content := .Scratch.Get "Content" -}}
{{- if .Site.Params.enableEmphasisPoint -}}
{{- $regexPatternEmphasisPoint := `([^\.])\.\.([^\.| |\n|/|\\]+)\.\.([^\.])` -}}
{{- $regexPatternEmphasisPoint := `([^\.\x60])\.\.([^\.\s\n\/\\]+)\.\.([^\.\x60])` -}}
{{- $regexReplacementEmphasisPoint := `$1<strong class="emphasis-point">$2</strong>$3` -}}
{{- $Content := $Content | replaceRE $regexPatternEmphasisPoint $regexReplacementEmphasisPoint | safeHTML -}}
{{- .Scratch.Set "Content" $Content -}}
Expand Down

0 comments on commit 6babe81

Please sign in to comment.