Merge pull request #10065 from SeekingMeaning/cli-help-underline
cli: fix underlined multi-line help text
This commit is contained in:
commit
54c93096b1
@ -338,8 +338,9 @@ module Homebrew
|
|||||||
.sub(/^/, "#{Tty.bold}Usage: brew#{Tty.reset} ")
|
.sub(/^/, "#{Tty.bold}Usage: brew#{Tty.reset} ")
|
||||||
.gsub(/`(.*?)`/m, "#{Tty.bold}\\1#{Tty.reset}")
|
.gsub(/`(.*?)`/m, "#{Tty.bold}\\1#{Tty.reset}")
|
||||||
.gsub(%r{<([^\s]+?://[^\s]+?)>}) { |url| Formatter.url(url) }
|
.gsub(%r{<([^\s]+?://[^\s]+?)>}) { |url| Formatter.url(url) }
|
||||||
.gsub(/<(.*?)>/m, "#{Tty.underline}\\1#{Tty.reset}")
|
.gsub(/\*(.*?)\*|<(.*?)>/m) do |underlined|
|
||||||
.gsub(/\*(.*?)\*/m, "#{Tty.underline}\\1#{Tty.reset}")
|
underlined[1...-1].gsub(/^(\s*)(.*?)$/, "\\1#{Tty.underline}\\2#{Tty.reset}")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def cask_options
|
def cask_options
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user