lib/reverse_adoc/converters/tr.rb in reverse_adoc-0.3.7 vs lib/reverse_adoc/converters/tr.rb in reverse_adoc-1.0.0
- old
+ new
@@ -1,20 +1,20 @@
module ReverseAdoc
module Converters
class Tr < Base
+ def to_coradoc(node, state = {})
+ content = treat_children_coradoc(node, state)
+ header = table_header_row?(node)
+ Coradoc::Element::Table::Row.new(content, header)
+ end
+
def convert(node, state = {})
- content = treat_children(node, state).rstrip
- result = "#{content}\n"
- table_header_row?(node) ? result + underline_for(node) : result
+ Coradoc::Generator.gen_adoc(to_coradoc(node, state))
end
def table_header_row?(node)
# node.element_children.all? {|child| child.name.to_sym == :th}
node.previous_element.nil?
- end
-
- def underline_for(node)
- "\n"
end
end
register :tr, Tr.new
end