Sha256: 5c41f3969c04771ce6a9b21d233526011b2d5ee44b235388e902d5392f0babed
Contents?: true
Size: 418 Bytes
Versions: 10
Compression:
Stored size: 418 Bytes
Contents
require "sablon/html/ast" require "sablon/html/visitor" module Sablon class HTMLConverter def process(input, env) @env = env processed_ast(input).to_docx end def processed_ast(input) ast = build_ast(input) ast.accept LastNewlineRemoverVisitor.new ast end def build_ast(input) doc = Nokogiri::HTML.fragment(input) Root.new(@env, doc) end end end
Version data entries
10 entries across 10 versions & 1 rubygems