From 3cec4fd950f69762daf7f44c46619cd31b1fc61e Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Tue, 05 Apr 2022 06:30:28 +0000
Subject: [PATCH] update screenshot

---
 layouts/partials/textprocessing.html |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/layouts/partials/textprocessing.html b/layouts/partials/textprocessing.html
index 8e4a794..008d163 100644
--- a/layouts/partials/textprocessing.html
+++ b/layouts/partials/textprocessing.html
@@ -5,7 +5,11 @@
 {{ $content = replace $content "-&gt;" "→" }}
 
 {{/* Escape slashes for Latex to fix line breaks */}}
-{{ $content = replaceRE "\\\\ *\n" "\\\\" $content }}
+{{$latex := findRE "\\$\\$([^\\$]+)\\$\\$" $content}}
+{{range $latex}}
+  {{$fixed := replaceRE "\\\\(?: +|\\n)" "\\\\" .}}
+  {{$content = replace $content . $fixed}}
+{{end}}
 
 {{/* Wikilinks */}}
 {{$wikilinks := $content | findRE "\\[\\[[^\\[\\]\\|]*(?:\\|[^\\[\\]]*)?\\]\\]" }}

--
Gitblit v1.10.0