We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
clean
1 parent bbad886 commit c44df27Copy full SHA for c44df27
lib/babosa/identifier.rb
@@ -146,7 +146,7 @@ def transliterate!(*kinds)
146
# replaces multiple whitespace characters with a single space.
147
# @return String
148
def clean!
149
- @wrapped_string = @wrapped_string.gsub("-", " ").squeeze(" ").strip
+ @wrapped_string = @wrapped_string.gsub(/[- ]+/, " ").strip
150
end
151
152
# Remove any non-word characters. For this library's purposes, this means
0 commit comments