Sha256: 41be9a62a56370a301a565642663c9d442fe8f1ebb14da9e3b4b78fcc5670795

Contents?: true

Size: 500 Bytes

Versions: 3

Compression:

Stored size: 500 Bytes

Contents

require 'asciidoctor/doctest/base_example'
require 'asciidoctor/doctest/html/html_beautifier'
require 'asciidoctor/doctest/html/normalizer'
require 'nokogiri'

module Asciidoctor::DocTest
  module HTML
    ##
    # Subclass of {BaseExample} for HTML-based backends.
    class Example < BaseExample

      def content_normalized
        Nokogiri::HTML.fragment(content).normalize!.to_s
      end

      def content_pretty
        HtmlBeautifier.beautify content_normalized
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
asciidoctor-doctest-1.5.1.2 lib/asciidoctor/doctest/html/example.rb
asciidoctor-doctest-1.5.1.1 lib/asciidoctor/doctest/html/example.rb
asciidoctor-doctest-1.5.1 lib/asciidoctor/doctest/html/example.rb