Sha256: c0b5fcb06e1e617e87b02818ee425bb8134a30e2d1e5121533f4872af7c2eb40

Contents?: true

Size: 515 Bytes

Versions: 11

Compression:

Stored size: 515 Bytes

Contents

# encoding: utf-8   

module ::Nanoc::Extra::Checking::Checks

  class HTML < ::Nanoc::Extra::Checking::Check

    identifier :html

    def run
      require 'w3c_validators'

      Dir[site.config[:output_dir] + '/**/*.{htm,html}'].each do |filename|
        results = ::W3CValidators::MarkupValidator.new.validate_file(filename)
        results.errors.each do |e|
          desc = e.message.gsub(%r{\s+}, ' ').strip
          self.add_issue(desc, :subject => filename)
        end
      end
    end

  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
nanoc-3.6.7 lib/nanoc/extra/checking/checks/html.rb
nanoc-3.6.6 lib/nanoc/extra/checking/checks/html.rb
nanoc-3.6.5 lib/nanoc/extra/checking/checks/html.rb
nanoc-3.6.4 lib/nanoc/extra/checking/checks/html.rb
nanoc-3.6.3 lib/nanoc/extra/checking/checks/html.rb
nanoc-3.6.2 lib/nanoc/extra/checking/checks/html.rb
nanoc-3.6.1 lib/nanoc/extra/checking/checks/html.rb
nanoc-3.6.0 lib/nanoc/extra/checking/checks/html.rb
nanoc-3.5.0 lib/nanoc/extra/checking/checks/html.rb
nanoc-3.5.0b2 lib/nanoc/extra/checking/checks/html.rb
nanoc-3.5.0b1 lib/nanoc/extra/checking/checks/html.rb