From 31d2b16e43492d3892d32b4153c2bc4222e305b8 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Fri, 26 Jul 2019 19:44:30 -0500 Subject: add `once`/`once:` flag bangtag --- app/lib/bangtags.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/lib/bangtags.rb b/app/lib/bangtags.rb index 13e34e933..7825f3f21 100644 --- a/app/lib/bangtags.rb +++ b/app/lib/bangtags.rb @@ -10,6 +10,7 @@ class Bangtags @parent_status = Status.find(status.in_reply_to_id) if status.in_reply_to_id @crunch_newlines = false + @once = false @prefix_ns = { 'permalink' => ['link'], @@ -98,6 +99,12 @@ class Bangtags end next if cmd[0].nil? + if cmd[0].downcase == 'once' + @once = true + cmd.shift + next if cmd[0].nil? + end + case cmd[0].downcase when 'var' chunk = nil -- cgit