lib/gitlab/help.rb in gitlab-3.2.0 vs lib/gitlab/help.rb in gitlab-3.3.0
- old
+ new
@@ -18,13 +18,13 @@
if namespace
begin
ri_output = `#{ri_cmd} -T #{namespace} 2>&1`.chomp
if $? == 0
- ri_output.gsub!(/#{cmd}\((.*)\)/, cmd+' \1')
+ ri_output.gsub!(/#{cmd}\((.*?)\)/m, cmd+' \1')
ri_output.gsub!(/Gitlab\./, 'gitlab> ')
ri_output.gsub!(/Gitlab\..+$/, '')
- ri_output.gsub!(/\,/, '')
+ ri_output.gsub!(/\,[\s]*/, ' ')
help = ri_output
else
help = "Ri docs not found for #{namespace}, please install the docs to use 'help'"
end
rescue => e