fix: text highlighting

This commit is contained in:
Jacky Zhao 2022-11-30 18:00:12 -08:00
parent 5676d90d56
commit caa966de8a

View File

@ -113,7 +113,7 @@
{{end}} {{end}}
{{/* Make ==text== into <mark>text</mark> */}} {{/* Make ==text== into <mark>text</mark> */}}
{{$mark := findRE "(?Us)==([^\\$]+)==" $content}} {{$mark := findRE "==([^=\n]+)==" $content}}
{{range $mark}} {{range $mark}}
{{$fixed := printf "<mark>%s</mark>" (replace . "==" "")}} {{$fixed := printf "<mark>%s</mark>" (replace . "==" "")}}
{{$content = replace $content . $fixed}} {{$content = replace $content . $fixed}}