1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Include file path in invisible space warning

While the warning is useful in itself, it doesn't tell you what file is
specifically causing the issue which can make resolving it harder than
it should be. As we've got the path already, we can simply include the
location of the problematic file in the warning message.
This commit is contained in:
Ivan Giuliani 2020-12-23 10:07:37 +00:00
parent e0fb817ffd
commit 66f8a2ea7f

View file

@ -33,7 +33,7 @@ module ActiveSupport
File.read(content_path).tap do |content|
if content.include?("\u00A0")
warn "File contains invisible non-breaking spaces, you may want to remove those"
warn "#{content_path} contains invisible non-breaking spaces, you may want to remove those"
end
end
end