From 962d3bee1cc1c6be693d9116330f8a0eb7b4553d Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Mon, 27 Jul 2020 15:47:23 -0500 Subject: [Bug, Command Tags] Only skip invalid templates rather than all templates --- app/lib/command_tag/processor.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/lib/command_tag') diff --git a/app/lib/command_tag/processor.rb b/app/lib/command_tag/processor.rb index 02e835474..574bf6ad4 100644 --- a/app/lib/command_tag/processor.rb +++ b/app/lib/command_tag/processor.rb @@ -95,10 +95,10 @@ class CommandTag::Processor def parse_templates(text) text.gsub(TEMPLATE_RE) do - return if Regexp.last_match(1).blank? + next if Regexp.last_match(1).blank? - template = Regexp.last_match(1).scan(/'([^']*)'|"([^"]*)"|(\S+)/).flatten.compact - return if template[0].blank? + template = Regexp.last_match(1).scan(/('[^']*')|("[^"]*")|(\S+)/).flatten.compact + next if template[0].blank? name = normalize(template[0]) separator = "\n" -- cgit