diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-07-26 19:44:30 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-07-26 19:44:30 -0500 |
commit | 31d2b16e43492d3892d32b4153c2bc4222e305b8 (patch) | |
tree | 89d01a6a764e698a60d04c4fa37cd7dfb7e62218 /app | |
parent | 9febf120299f22c4e9dddd8dacea7c30fc750d7d (diff) |
add `once`/`once:` flag bangtag
Diffstat (limited to 'app')
-rw-r--r-- | app/lib/bangtags.rb | 7 |
1 files changed, 7 insertions, 0 deletions
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 |