From 1f0c261fd2d3da250f62040236f7629f603f0b03 Mon Sep 17 00:00:00 2001 From: tobi Date: Wed, 7 May 2025 11:48:21 +0000 Subject: [bugfix] Fix indentation on multi-line alt text in web view (#4149) This pull request closes https://codeberg.org/superseriousbusiness/gotosocial/issues/3403 by searching for alt or title attributes in HTML, looking for the shortest indent (if any) at the start of multiline content of said attributes, and remove that shortest indent from each line. This is a bit more fiddly than the "easy" way of doing it, but it has the advantage that it preserves user-added indents at the start of lines of alt text. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4149 Co-authored-by: tobi Co-committed-by: tobi --- web/template/page.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/template') diff --git a/web/template/page.tmpl b/web/template/page.tmpl index 0a54e74cb..4ea168300 100644 --- a/web/template/page.tmpl +++ b/web/template/page.tmpl @@ -79,7 +79,7 @@ image/webp {{- include "page_header.tmpl" . | indent 3 }}
- {{- include .pageContent . | indent 3 | outdentPre }} + {{- include .pageContent . | indent 3 | outdentPreformatted }}