From d80f6946c854365336062f71f0c922fb42beea54 Mon Sep 17 00:00:00 2001
From: Morgan Gallant <morgan@morgangallant.com>
Date: Mon, 21 Nov 2022 16:54:45 +0000
Subject: [PATCH] fix: Semantic Search: Use Operand Beta API (#235)

---
 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