brew style --fix
This commit is contained in:
parent
a881e4365a
commit
02c2a348c4
@ -22,7 +22,7 @@ module Homebrew
|
||||
# Strip unprintable characters
|
||||
if app_details
|
||||
name = T.must(app_details[:name])
|
||||
[T.must(app_details[:id]), name.gsub(/[[:cntrl:]]|[\p{C}]/, "")]
|
||||
[T.must(app_details[:id]), name.gsub(/[[:cntrl:]]|\p{C}/, "")]
|
||||
end
|
||||
end
|
||||
else
|
||||
|
||||
@ -599,7 +599,7 @@ module Homebrew
|
||||
end\s
|
||||
/x
|
||||
|
||||
leading_spaces = T.must(formula.path.read.match(/^([ ]+)resource "#{resource.name}"/)).captures.first
|
||||
leading_spaces = T.must(formula.path.read.match(/^( +)resource "#{resource.name}"/)).captures.first
|
||||
new_resource_block = <<~EOS
|
||||
#{leading_spaces}resource "#{resource.name}" do
|
||||
#{leading_spaces} url "#{new_url}"#{new_mirrors.map { |m| "\n#{leading_spaces} mirror \"#{m}\"" }.join}
|
||||
|
||||
@ -22,7 +22,7 @@ module Homebrew
|
||||
end
|
||||
|
||||
# HTML-like tags denote variables instead, except <br>.
|
||||
VARIABLE_REGEX = /<([\w\-\|]+)>/
|
||||
VARIABLE_REGEX = /<([\w\-|]+)>/
|
||||
def parse_variable
|
||||
start_line_number = @src.current_line_number
|
||||
@src.scan(VARIABLE_REGEX)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user