aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/help.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cmd/help.rb')
-rw-r--r--Library/Homebrew/cmd/help.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/Library/Homebrew/cmd/help.rb b/Library/Homebrew/cmd/help.rb
index 05a3003cc..c8845b086 100644
--- a/Library/Homebrew/cmd/help.rb
+++ b/Library/Homebrew/cmd/help.rb
@@ -78,11 +78,12 @@ module Homebrew
HOMEBREW_HELP
else
help_lines.map do |line|
- line.slice(2..-1).
- sub(/^ \* /, "#{Tty.bold}brew#{Tty.reset} ").
- gsub(/`(.*?)`/, "#{Tty.bold}\\1#{Tty.reset}").
- gsub(/<(.*?)>/, "#{Tty.underline}\\1#{Tty.reset}").
- gsub("@hide_from_man_page", "")
+ line.slice(2..-1)
+ .sub(/^ \* /, "#{Tty.bold}brew#{Tty.reset} ")
+ .gsub(/`(.*?)`/, "#{Tty.bold}\\1#{Tty.reset}")
+ .gsub(%r{<([^\s]+?://[^\s]+?)>}) { |url| Formatter.url(url) }
+ .gsub(/<(.*?)>/, "#{Tty.underline}\\1#{Tty.reset}")
+ .gsub("@hide_from_man_page", "")
end.join.strip
end
end