Patch #40014 » support-comma-with-double-quotes.patch
| lib/redmine/wiki_formatting/macros.rb | ||
|---|---|---|
|
method_name = "macro_#{name}"
|
||
|
unless macro_options[:parse_args] == false
|
||
|
args = args.split(',').map(&:strip)
|
||
|
args = args.split(/\s*,\s*(?=(?:[^"]*"[^"]*")*[^"]*$)/).map{|i| i.gsub(/^"(.*)"$/, '\1').gsub('""', '"')}
|
||
|
end
|
||
|
begin
|
||
| ... | ... | |
|
def extract_macro_options(args, *keys)
|
||
|
options = {}
|
||
|
while args.last.to_s.strip =~ %r{^(.+?)\=(.+)$} && keys.include?($1.downcase.to_sym)
|
||
|
options[$1.downcase.to_sym] = $2
|
||
|
options[$1.downcase.to_sym] = $2.gsub(/^"(.*)"$/, '\1')
|
||
|
args.pop
|
||
|
end
|
||
|
return [args, options]
|
||