lib/stepmod/utils/converters/table.rb in stepmod-utils-0.4.11 vs lib/stepmod/utils/converters/table.rb in stepmod-utils-0.4.12
- old
+ new
@@ -2,11 +2,10 @@
module Stepmod
module Utils
module Converters
class Table < Stepmod::Utils::Converters::Base
-
def self.pattern(state, id)
if state[:schema_and_entity].nil?
raise StandardError.new("[table]: no state given, #{id}")
end
@@ -21,11 +20,17 @@
id = node["id"]
anchor = id ? "[[table-#{self.class.pattern(state, id)}]]\n" : ""
title = node["caption"].to_s
title = ".#{title}\n" unless title.empty?
attrs = style(node)
- "\n\n#{anchor}#{attrs}#{title}|===\n#{treat_children(node,
- state)}\n|===\n"
+
+ <<~TABLE
+
+
+ #{anchor}#{attrs}#{title}|===
+ #{treat_children(node, state.merge(inside_table: true))}
+ |===
+ TABLE
end
def frame(node)
case node["frame"]
when "void"