Skip to content
Snippets Groups Projects
Commit 7458bca3 authored by Holger Just's avatar Holger Just
Browse files

Don't create arguments for legacy tags if there aren't any

parent 60deeb53
Tags
No related merge requests found
......@@ -24,7 +24,8 @@ module ChiliProject
next unless macro[:match].present? && macro[:replace].present?
content = content.gsub(macro[:match]) do |match|
# Use block form so $1 and $2 are set properly
"{#{macro[:replace]} #{macro[:new_name]} '#{$2}' #{macro[:replace]}}"
args = " '#{$2}'" if $2
"{#{macro[:replace]} #{macro[:new_name]}#{args} #{macro[:replace]}}"
end
end
content
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment