Skip to content

Commit c44df27

Browse files
committed
Simplify definition of clean
1 parent bbad886 commit c44df27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/babosa/identifier.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def transliterate!(*kinds)
146146
# replaces multiple whitespace characters with a single space.
147147
# @return String
148148
def clean!
149-
@wrapped_string = @wrapped_string.gsub("-", " ").squeeze(" ").strip
149+
@wrapped_string = @wrapped_string.gsub(/[- ]+/, " ").strip
150150
end
151151

152152
# Remove any non-word characters. For this library's purposes, this means

0 commit comments

Comments
 (0)