From f183ba369f7ad3e073845456e822ba7704488863 Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Mon, 27 Jul 2020 15:43:34 -0500 Subject: [Command Tags] Require templates to have at least one non-blank character between sigils --- app/lib/command_tag/processor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/lib/command_tag/processor.rb b/app/lib/command_tag/processor.rb index 74fe30509..02e835474 100644 --- a/app/lib/command_tag/processor.rb +++ b/app/lib/command_tag/processor.rb @@ -18,7 +18,7 @@ class CommandTag::Processor MENTIONS_OR_HASHTAGS_RE = /(?:(?:#{Account::MENTION_RE}|#{Tag::HASHTAG_RE})\s*)+/.freeze PARSEABLE_RE = /^\s*(?:#{MENTIONS_OR_HASHTAGS_RE})?#!|%%.+?%%/.freeze STATEMENT_RE = /^\s*#!\s*[^\n]+ (?:start|begin|do)$.*?\n\s*#!\s*(?:end|stop|done)\s*$|^\s*#!\s*.*?\s*$/im.freeze - TEMPLATE_RE = /%%\s*(.*?)\s*%%/.freeze + TEMPLATE_RE = /%%\s*(.+?)\s*%%/.freeze ESCAPE_MAP = { '\n' => "\n", '\r' => "\r", -- cgit