From d150ef00c5f0d2f132dce503b68c467ce825a54f Mon Sep 17 00:00:00 2001 From: Laurent Arnoud Date: Thu, 23 Feb 2017 21:57:01 +0100 Subject: [PATCH] Fix w3c_validator.rb validation script --- guides/w3c_validator.rb | 9 +++++---- 1 file 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