class BookLab::SML::Rules::Td

Public Class Methods

match?(node) click to toggle source
# File lib/booklab/sml/rules/td.rb, line 5
def self.match?(node)
  tag_name(node) == "tc"
end
to_html(node, opts = {}) click to toggle source
# File lib/booklab/sml/rules/td.rb, line 9
def self.to_html(node, opts = {})
  renderer = opts[:renderer]
  attrs = attributes(node)
  children = renderer.children_to_html(node)

  style = {}
  style_attrs = style_for_attrs(attrs, style)
  %(<td#{style_attrs}>#{children}</td>)
end