diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-02-23 17:26:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-23 17:26:31 -0500 |
commit | 18afe45d7c564e5b9bc453bbe06a2aa78aebe246 (patch) | |
tree | be7dbda03c369ff28ed449e713df2e59500d000e /guides | |
parent | 771637269dca82782b30e0ef0ef96b5428c6defb (diff) | |
parent | d150ef00c5f0d2f132dce503b68c467ce825a54f (diff) | |
download | rails-18afe45d7c564e5b9bc453bbe06a2aa78aebe246.tar.gz rails-18afe45d7c564e5b9bc453bbe06a2aa78aebe246.tar.bz2 rails-18afe45d7c564e5b9bc453bbe06a2aa78aebe246.zip |
Merge pull request #28022 from spk/guides-validation
Fix w3c_validator.rb validation script
Diffstat (limited to 'guides')
-rw-r--r-- | guides/w3c_validator.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/guides/w3c_validator.rb b/guides/w3c_validator.rb index c0a32c6b91..4671e040ca 100644 --- a/guides/w3c_validator.rb +++ b/guides/w3c_validator.rb @@ -32,7 +32,8 @@ include W3CValidators module RailsGuides class Validator def validate - validator = MarkupValidator.new + # https://github.com/w3c-validators/w3c_validators/issues/25 + validator = NuValidator.new STDOUT.sync = true errors_on_guides = {} @@ -44,11 +45,11 @@ module RailsGuides next end - if results.validity - print "." - else + if results.errors.length > 0 print "E" errors_on_guides[f] = results.errors + else + print "." end end |