mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-30 01:08:26 -05:00
Rubocop: Style/RegexpLiteral
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user