Skip to content

Commit

Permalink
hott-2270: use gsub instead of sub
Browse files Browse the repository at this point in the history
  • Loading branch information
maverickvi committed Nov 28, 2022
1 parent e55aa42 commit dffdad5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def verbose_duty_expression
end

def prettify_generated_duty_expression!(duty_expression)
duty_expression.sub(/\s\s/, ' ').gsub(/(\d)\s+%/, '\1%').sub(/\/\s[a-zA-Z]/, &:downcase)
duty_expression.gsub(/\s\s/, ' ').gsub(/(\d)\s+%/, '\1%').sub(/\/\s[a-zA-Z]/, &:downcase)
end

def national_measurement_units_for(declarable)
Expand Down

0 comments on commit dffdad5

Please sign in to comment.