zaphyra's git: tgcNUR

fork of https://git.transgirl.cafe/zaphoid/tgc-nix-user-repository

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
From 319ef126ac07b7dc4d63ab749b2dac7fe155a905 Mon Sep 17 00:00:00 2001
From: "Katja Ramona Sophie Kwast (zaphyra)" <git@zaphyra.eu>
Date: Fri, 22 Aug 2025 09:46:11 +0200
Subject: [PATCH] disable template indentation

---
 internal/router/template.go | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/internal/router/template.go b/internal/router/template.go
index 860f9aad5..e4d0d99f5 100644
--- a/internal/router/template.go
+++ b/internal/router/template.go
@@ -323,21 +323,13 @@ func subtract(n1 int, n2 int) int {
 // indent appropriately indents the given html
 // by prepending each line with the indentStr.
 func indent(n int, html template.HTML) template.HTML {
-	out := indentRegex.ReplaceAllString(
-		string(html),
-		indents[:n*indentStrLen],
-	)
-	return noescape(out)
+	return html
 }
 
 // indentAttr appropriately indents the given html
 // attribute by prepending each line with the indentStr.
 func indentAttr(n int, html template.HTMLAttr) template.HTMLAttr {
-	out := indentRegex.ReplaceAllString(
-		string(html),
-		indents[:n*indentStrLen],
-	)
-	return noescapeAttr(out)
+	return html
 }
 
 // outdentPreformatted outdents all preformatted text in
-- 
2.50.1