diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-05-21 01:55:03 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-05-21 03:16:51 -0500 |
commit | 83c2c466fb407607948306b59aebfc1767a4ad7e (patch) | |
tree | b0a9475ca51dfdf9a1961753ed7017dbd554bde4 /app/lib | |
parent | 55e048412166afe4202682ce22ced4f88841010f (diff) |
use dots instead of colons for tag scopes
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/bangtags.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/lib/bangtags.rb b/app/lib/bangtags.rb index 33721e0c2..3441b7464 100644 --- a/app/lib/bangtags.rb +++ b/app/lib/bangtags.rb @@ -36,7 +36,7 @@ class Bangtags end def process - return unless status.text&.present? && status.text.include?('#!') + return unless !@vars['_bangtags:disable'] && status.text&.present? && status.text.include?('#!') status.text.gsub!('#!!', "#\u200c!") @@ -218,7 +218,7 @@ class Bangtags chunk = mentions.join(' ') when 'tag' chunk = nil - tags = cmd[1..-1].map {|t| t.gsub('.', ':')} + tags = cmd[1..-1].map {|t| t.gsub(':', '.')} add_tags(status, *tags) when 'thread' chunk = nil @@ -291,7 +291,7 @@ class Bangtags when 'tag' chunk = nil next unless @parent_status.account.id == @account.id - tags = cmd[2..-1].map {|t| t.gsub('.', ':')} + tags = cmd[2..-1].map {|t| t.gsub(':', '.')} add_tags(@parent_status, *tags) when 'emoji' @parent_status.emojis.each do |theirs| @@ -404,7 +404,7 @@ class Bangtags status.visibility = :direct @vore_stack.push('_draft') @component_stack.push(:var) - add_tags(status, 'self:draft') + add_tags(status, 'self.draft') when 'format', 'type' chunk = nil next if cmd[1].nil? |