class Roadie::Document

def transform_partial

Returns:
  • (String) - the transformed HTML

Other tags:
    See: #transform - Transforms full documents
    See: UrlRewriter - UrlRewriter (rewrites URLs and makes them absolute)
    See: Inliner - Inliner (inlines the stylesheets)
def transform_partial
  dom = Nokogiri::HTML.fragment html
  callback before_transformation, dom
  inline dom, keep_uninlinable_in: :root
  rewrite_urls dom
  callback after_transformation, dom
  serialize_document dom
end