brew style --fix

This commit is contained in:
Mike McQuaid 2025-08-22 10:41:43 +01:00
parent a881e4365a
commit 02c2a348c4
No known key found for this signature in database
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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}

View File

@ -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)