about summary refs log tree commit diff
path: root/app/helpers/formatting_helper.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-02-20 22:41:20 +0100
committerGitHub <noreply@github.com>2023-02-20 22:41:20 +0100
commit45087c1092143e95dfcc85b6c9abc5c6c0a0a5c2 (patch)
treee4be53cb0b2e7f876bea6c61d4fe64d7586ae63d /app/helpers/formatting_helper.rb
parent4c68189d2b8b6a9a74fc13862b11bf6c6d523409 (diff)
parentdc0cc5a57d224b4c53bc58dad919b727055bd9a3 (diff)
Merge pull request #2117 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/helpers/formatting_helper.rb')
-rw-r--r--app/helpers/formatting_helper.rb44
1 files changed, 20 insertions, 24 deletions
diff --git a/app/helpers/formatting_helper.rb b/app/helpers/formatting_helper.rb
index 05c003037..5b2ac1a2a 100644
--- a/app/helpers/formatting_helper.rb
+++ b/app/helpers/formatting_helper.rb
@@ -21,30 +21,26 @@ module FormattingHelper
   def rss_status_content_format(status)
     html = status_content_format(status)
 
-    before_html = begin
-      if status.spoiler_text?
-        tag.p do
-          tag.strong do
-            I18n.t('rss.content_warning', locale: available_locale_or_nil(status.language) || I18n.default_locale)
-          end
-
-          status.spoiler_text
-        end + tag.hr
-      end
-    end
-
-    after_html = begin
-      if status.preloadable_poll
-        tag.p do
-          safe_join(
-            status.preloadable_poll.options.map do |o|
-              tag.send(status.preloadable_poll.multiple? ? 'checkbox' : 'radio', o, disabled: true)
-            end,
-            tag.br
-          )
-        end
-      end
-    end
+    before_html = if status.spoiler_text?
+                    tag.p do
+                      tag.strong do
+                        I18n.t('rss.content_warning', locale: available_locale_or_nil(status.language) || I18n.default_locale)
+                      end
+
+                      status.spoiler_text
+                    end + tag.hr
+                  end
+
+    after_html = if status.preloadable_poll
+                   tag.p do
+                     safe_join(
+                       status.preloadable_poll.options.map do |o|
+                         tag.send(status.preloadable_poll.multiple? ? 'checkbox' : 'radio', o, disabled: true)
+                       end,
+                       tag.br
+                     )
+                   end
+                 end
 
     prerender_custom_emojis(
       safe_join([before_html, html, after_html]),