mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix ConfigurationFile check for non-breaking space
The regular expression used to check for non-breaking spaces is invalid, but prints a warning ("Unknown escape \U is ignored: /\U+A0/") instead of raising an error. This commit fixes the check (and the warning).
This commit is contained in:
parent
c29afa3872
commit
58470a06ad
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ module ActiveSupport
|
|||
require "erb"
|
||||
|
||||
File.read(content_path).tap do |content|
|
||||
if content.match?(/\U+A0/)
|
||||
if content.include?("\u00A0")
|
||||
warn "File contains invisible non-breaking spaces, you may want to remove those"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue