diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-07-27 15:47:23 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:16 -0500 |
commit | 962d3bee1cc1c6be693d9116330f8a0eb7b4553d (patch) | |
tree | 065cb087f0c654780bbf17c234956074723831ca | |
parent | f183ba369f7ad3e073845456e822ba7704488863 (diff) |
[Bug, Command Tags] Only skip invalid templates rather than all templates
-rw-r--r-- | app/lib/command_tag/processor.rb | 6 |
1 files changed, 3 insertions, 3 deletions
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" |