Permalink
Browse files

Text::Table will add trailing whitespace to pad messages to the longe…

…st message. I (avar) wasn't able to find out how to make it stop doing that so I'm hacking around it with regex!

git-svn-id: http://svn.pugscode.org/pugs/misc/irclog@25305 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 5979aeb commit 373cec4a67e850f61ebc37e17052504f2deb5d7b avar committed Feb 12, 2009
Showing with 7 additions and 1 deletion.
  1. +7 −1 cgi/text.pl
View
@@ -54,9 +54,15 @@
);
}
my $text = encode_entities($table, '<>&');
+
+# Text::Table will add trailing whitespace to pad messages to the
+# longest message. I (avar) wasn't able to find out how to make it
+# stop doing that so I'm hacking around it with regex!
+$text =~ s/ +$//gm;
+
print encode("utf-8", $text);
+print "</pre></body></html>\n";
-print "</pre></body></html>\n"

0 comments on commit 373cec4

Please sign in to comment.