Rubocop: Style/RegexpLiteral

This commit is contained in:
Pat Hawks 2016-01-03 17:10:39 -08:00
parent e3189e3828
commit fd8fdd87d3
No known key found for this signature in database
GPG Key ID: F1746FF5F18B3D1B
2 changed files with 2 additions and 2 deletions

View File

@ -124,7 +124,7 @@ module Jekyll
:template => @collection.url_template,
:placeholders => placeholders,
})
end.to_s.gsub /\/$/, ''
end.to_s.gsub(/\/$/, '')
end
# Returns the type of the collection if present, nil otherwise.

View File

@ -92,7 +92,7 @@ module Jekyll
# as well as the beginning "/" so we can enforce and ensure it.
def sanitize_url(str)
"/" + str.gsub(/\/{2,}/, "/").gsub(%r!\.+\/|\A/+!, "")
"/" + str.gsub(/\/{2,}/, "/").gsub(/\.+\/|\A\/+/, "")
end
# Escapes a path to be a valid URL path segment