Sha256: d226ad506121bbae5088472c00d2aa6331e65a6921c206f61f4fca7169be7f77
Contents?: true
Size: 533 Bytes
Versions: 21
Compression:
Stored size: 533 Bytes
Contents
# frozen_string_literal: true # :markup: markdown module ActionText module HtmlConversion extend self def node_to_html(node) node.to_html(save_with: Nokogiri::XML::Node::SaveOptions::AS_HTML) end def fragment_for_html(html) document.fragment(html) end def create_element(tag_name, attributes = {}) document.create_element(tag_name, attributes) end private def document ActionText.html_document_class.new.tap { |doc| doc.encoding = "UTF-8" } end end end
Version data entries
21 entries across 21 versions & 2 rubygems