feat: Replace == with <mark> (#234)

Co-authored-by: SAF <saf@saf.saf>
This commit is contained in:
SafEightandSAF authored and GitHub committed 2022-11-19 13:17:55 -08:00
1 parent 7f9f58860d
commit de2b6b9a1b
3 files changed
+13

No files matched your search

+7
View File
@@ -96,4 +96,11 @@
{{ $content = $content | replaceRE "blockquote class=callout" "blockquote" }}
{{end}}
{{/* Make ==text== into <mark>text</mark> */}}
{{$mark := findRE "(?Us)==([^\\$]+)==" $content}}
{{range $mark}}
{{$fixed := printf "<mark>%s</mark>" (replace . "==" "")}}
{{$content = replace $content . $fixed}}
{{end}}
{{ $content | safeHTML }}