From 81a551791d3fcf347072e94298f598aa7b329b12 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sat, 16 Nov 2019 22:12:31 -0600 Subject: When normalizing the text of local posts, skip `Formatter` cache (but allow the results to be cached) by default. --- app/helpers/text_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/text_helper.rb b/app/helpers/text_helper.rb index c042c0342..614158c1b 100644 --- a/app/helpers/text_helper.rb +++ b/app/helpers/text_helper.rb @@ -24,8 +24,8 @@ module TextHelper t.unaccent_via_split_map.strip end - def normalize_status(status) + def normalize_status(status, cache: true, skip_cache: true) return normalize_text("#{status.spoiler_text}\n#{status.text}") unless status.local? - normalize_text("#{status.spoiler_text}\n#{Formatter.instance.format(status)}") + normalize_text("#{status.spoiler_text}\n#{Formatter.instance.format(status, skip_cache: skip_cache, cache: cache)}") end end -- cgit