diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-12-06 12:08:38 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-12-06 12:08:38 -0600 |
commit | ac5fb845afd01de0bfe9c1bfe8245af8dedac9bb (patch) | |
tree | 4ea044f9e6c792ec25fce7d592ee1af5474dcaee /app/lib/formatter.rb | |
parent | 996cb6818f30b2749f510cda91c637d506ca8fe1 (diff) |
use `self.draft` scope tag for draft posts & add draft header
Diffstat (limited to 'app/lib/formatter.rb')
-rw-r--r-- | app/lib/formatter.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb index 31cfc8220..5a1572c05 100644 --- a/app/lib/formatter.rb +++ b/app/lib/formatter.rb @@ -240,6 +240,10 @@ class Formatter html = "#{html.strip}\n<p class=\"signature\">— #{footer}</p>" end + if status.draft? + html = "<h1 class=\"draft\">Draft</h1>\n#{html}" + end + html = encode_custom_emojis(html, status.emojis, options[:autoplay]) if options[:custom_emojify] html.html_safe # rubocop:disable Rails/OutputSafety end |