aboutsummaryrefslogtreecommitdiffstats
path: root/guides/w3c_validator.rb
diff options
context:
space:
mode:
Diffstat (limited to 'guides/w3c_validator.rb')
-rw-r--r--guides/w3c_validator.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/guides/w3c_validator.rb b/guides/w3c_validator.rb
index c0a32c6b91..f38b6c2639 100644
--- a/guides/w3c_validator.rb
+++ b/guides/w3c_validator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# ---------------------------------------------------------------------------
#
# This script validates the generated guides against the W3C Validator.
@@ -32,7 +34,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 +47,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