lib/k_doc/document.rb in k_doc-0.0.6 vs lib/k_doc/document.rb in k_doc-0.0.7

- old
+ new

@@ -116,17 +116,20 @@ # add specs result = data result.each_key do |key| # ANTI: get_node_type uses @data while we are using @data.clone here - data[key] = if get_node_type(key) == :table - result[key].delete('fields') - else - result[key] - end + result[key] = if get_node_type(key) == :table + # Old format was to keep the rows and delete the fields + # Now the format is to pull the row_value up to the key and remove rows and fields + # result[key].delete('fields') + result[key]['rows'] + else + result[key] + end end - data + result end # Move this out to the logger function when it has been refactor def debug(include_header: false) debug_header if include_header