(re-sending this to the list without the image attachment, for completion)
Morning,
You can try for example
gopher://astio.zapto.org/1/~C7H14N2O3/
or
gopher://texto-plano.xyz
for a simpler example of a site (hole?) using an "ascii banner".
I'll attach an image to show current and after change (after on top :)
), hope the mailing list accepts it.
----
EDIT: it does not :D
O mér., 19 de feb. de 2025 ás 08:29, Ploum (<sourcehut24@ploum.eu>) escribiu:
---
Hi there,
I've noticed that some gopher sites include some "ascii art" that was showing left-aligned in offpunk
Taking a look at the code, and playing around a bit, I ended doing this very tiny little change (based on what you do for preformatted text in gemini, I think), t hat solves that issue. I think it makes sense, given my limited gopher use, since a lot of places use indentation and whitespaces to spice up their site.
What I'm not sure at all is if it will cause side effects for some other cases somewhere else. If so, feel free to ignore.
Regards!
PS: I think that, again, I have sent this email to the wrong address before. Apologies :(
ansicat.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ansicat.py b/ansicat.py
index e530fdb..d792433 100755
--- a/ansicat.py+++ b/ansicat.py
@@ -815,7 +815,7 @@ class GopherRenderer(AbstractRenderer):
if line.startswith("i"):
towrap = line[1:].split("\t")[0]
if len(towrap.strip()) > 0:
- r.add_text(towrap)+ r.add_block(towrap+"\n") else:
r.newparagraph()
elif line.strip() not in [".", ""]:
--
2.47.2