From 319ef126ac07b7dc4d63ab749b2dac7fe155a905 Mon Sep 17 00:00:00 2001 From: "Katja Ramona Sophie Kwast (zaphyra)" 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