diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-11-16 22:12:31 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-11-16 22:12:31 -0600 |
commit | 81a551791d3fcf347072e94298f598aa7b329b12 (patch) | |
tree | b2e68685da1b0b53178b69f15414192e80200e3b /app/helpers | |
parent | a5335d8baeffcfe8bcdb8e41f7908644b19d667f (diff) |
When normalizing the text of local posts, skip `Formatter` cache (but allow the results to be cached) by default.
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/text_helper.rb | 4 |
1 files 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 |