From 18a2ccb66775400f459ff874a651b96375a9e644 Mon Sep 17 00:00:00 2001 From: swaggboi Date: Fri, 2 May 2025 14:51:14 -0400 Subject: [PATCH] New Markdown behavior for RSS feeds --- lib/PostText/Controller/Remark.pm | 4 +++- lib/PostText/Controller/Thread.pm | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/PostText/Controller/Remark.pm b/lib/PostText/Controller/Remark.pm index 7df4f73..22f242a 100644 --- a/lib/PostText/Controller/Remark.pm +++ b/lib/PostText/Controller/Remark.pm @@ -147,7 +147,9 @@ sub feed($self) { ); for my $remark (@{$remarks}) { - my $description = $self->markdown($remark->{'body'}); + my $description = $remark->{'markdown'} + ? $self->markdown($remark->{'body'}) + : $remark->{'body'}; my $item_link = $self->url_for( single_remark => {remark_id => $remark->{'id'}} )->to_abs; diff --git a/lib/PostText/Controller/Thread.pm b/lib/PostText/Controller/Thread.pm index b1bda04..198659a 100644 --- a/lib/PostText/Controller/Thread.pm +++ b/lib/PostText/Controller/Thread.pm @@ -150,7 +150,9 @@ sub feed($self) { ); for my $thread (@{$threads}) { - my $description = $self->markdown($thread->{'body'}); + my $description = $thread->{'markdown'} + ? $self->markdown($thread->{'body'}) + : $thread->{'body'}; my $item_link = $self->url_for( single_thread => {thread_id => $thread->{'id'}} )->to_abs;