From 782545b70ffe46eb354b7f5458aee278c4a5aee7 Mon Sep 17 00:00:00 2001 From: swag Date: Sun, 4 Jun 2023 16:47:50 -0400 Subject: [PATCH] Shorten truncated text to 300 characters (for Open Graph) --- lib/PostText.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PostText.pm b/lib/PostText.pm index 162b4b1..fbb8c7f 100644 --- a/lib/PostText.pm +++ b/lib/PostText.pm @@ -62,8 +62,8 @@ sub startup($self) { }); $self->helper(truncate_text => sub ($c, $input_text) { - my $truncated_text = 500 < length($input_text) - ? substr($input_text, 0, 500) . '…' : $input_text; + my $truncated_text = 299 < length($input_text) + ? substr($input_text, 0, 299) . '…' : $input_text; return $truncated_text; });