From e374e3abd42c1719ad1fdc6bd9c641efb2ddf954 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Tue, 22 Nov 2022 07:36:27 +0000
Subject: [PATCH] fix: jump to search for operand
---
layouts/partials/textprocessing.html | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/layouts/partials/textprocessing.html b/layouts/partials/textprocessing.html
index 6776fa5..bd2cca5 100644
--- a/layouts/partials/textprocessing.html
+++ b/layouts/partials/textprocessing.html
@@ -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 }}
--
Gitblit v1.10.0