Class: Canon::Formatters::Html4Formatter

Inherits:
HtmlFormatterBase show all
Defined in:
lib/canon/formatters/html4_formatter.rb

Overview

HTML4 formatter using Nokogiri::HTML parser

Constant Summary

Constants inherited from HtmlFormatterBase

Canon::Formatters::HtmlFormatterBase::BLOCK_ELEMENTS, Canon::Formatters::HtmlFormatterBase::WHITESPACE_SENSITIVE_ELEMENTS

Class Method Summary collapse

Methods inherited from HtmlFormatterBase

canonicalize, format

Class Method Details

.parse(html) ⇒ Nokogiri::HTML::Document

Parse HTML4 document

Parameters:

  • html (String)

    HTML document to parse

Returns:

  • (Nokogiri::HTML::Document)

    Parsed HTML4 document



12
13
14
# File 'lib/canon/formatters/html4_formatter.rb', line 12

def self.parse(html)
  Nokogiri::HTML(html)
end