diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-07-30 14:54:22 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:16 -0500 |
commit | b2129db547f89ec1e02bf0742cd08fe466867386 (patch) | |
tree | 63d85355501dbbc30947d0c31f903fb6a0e6b4d6 /app | |
parent | f4a554511251db7333d47f3e915905a5b83515bf (diff) |
[Bug, Command Tags] Strip end markers out of multi-line text blocks
Diffstat (limited to 'app')
-rw-r--r-- | app/lib/command_tag/processor.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/lib/command_tag/processor.rb b/app/lib/command_tag/processor.rb index aa22c6311..cb447f851 100644 --- a/app/lib/command_tag/processor.rb +++ b/app/lib/command_tag/processor.rb @@ -137,7 +137,7 @@ class CommandTag::Processor statement = unescape_literals(Regexp.last_match(0).strip[2..-1]) next if statement.blank? - statement_array = statement.scan(/'([^']*)'|"([^"]*)"|(\S+)|\s+(?:start|begin|do)\s*$\n+(.*)/im).flatten.compact + statement_array = statement.scan(/'([^']*)'|"([^"]*)"|(\S+)|\s+(?:start|begin|do)\s*$\n+(.*)\n\s*#!\s*(?:end|stop|done)\s*\z/im).flatten.compact statement_array[0] = statement_array[0].strip.tr(':.\- ', '_').gsub(/__+/, '_').downcase next unless statement_array[0].match?(/\A[\w_]+\z/) |