1
0
Fork 0
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:
Jonathan Hefner 2020-02-15 14:37:01 -06:00
parent c29afa3872
commit 58470a06ad

View file

@ -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