From de2b6b9a1b95cb6af7eb421d9a4de054e7e41315 Mon Sep 17 00:00:00 2001 From: SafEight <43656822+SafEight@users.noreply.github.com> Date: Sat, 19 Nov 2022 21:17:55 +0000 Subject: [PATCH] feat: Replace == with (#234) Co-authored-by: SAF --- assets/styles/base.scss | 4 ++++ assets/styles/custom.scss | 2 ++ layouts/partials/textprocessing.html | 7 +++++++ 3 files changed, 13 insertions(+) diff --git a/assets/styles/base.scss b/assets/styles/base.scss index 8bd97efa1..80e29dec9 100644 --- a/assets/styles/base.scss +++ b/assets/styles/base.scss @@ -619,3 +619,7 @@ header { } } +mark { + background-color: var(--highlighted); + color: var(--gray); +} diff --git a/assets/styles/custom.scss b/assets/styles/custom.scss index a7a2e7992..fc0108a53 100644 --- a/assets/styles/custom.scss +++ b/assets/styles/custom.scss @@ -11,6 +11,7 @@ --lightgray: #f0f0f0; --outlinegray: #dadada; --million-progress-bar-color: var(--secondary); + --highlighted: #f5dfaf88; } [saved-theme="dark"] { @@ -23,6 +24,7 @@ --gray: #d4d4d4 !important; --lightgray: #292633 !important; --outlinegray: #343434 !important; + --highlighted: #574010; } diff --git a/layouts/partials/textprocessing.html b/layouts/partials/textprocessing.html index 6776fa5b1..bd2cca5de 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 text */}} +{{$mark := findRE "(?Us)==([^\\$]+)==" $content}} +{{range $mark}} + {{$fixed := printf "%s" (replace . "==" "")}} + {{$content = replace $content . $fixed}} +{{end}} + {{ $content | safeHTML }}