lib/kramdown/parser/kramdown/table.rb in kramdown-2.1.0 vs lib/kramdown/parser/kramdown/table.rb in kramdown-2.2.0
- old
+ new
@@ -130,11 +130,11 @@
break
elsif lines.size == 2 && pipe_on_line
pipe_on_line = false
end
else
- break if lines.size > 1 && !pipe_on_line && lines.first !~ /^#{TABLE_PIPE_CHECK}/
- pipe_on_line = (lines.size > 1 ? false : pipe_on_line) || (lines.last =~ /^#{TABLE_PIPE_CHECK}/)
+ break if lines.size > 1 && !pipe_on_line && lines.first !~ /^#{TABLE_PIPE_CHECK}/o
+ pipe_on_line = (lines.size > 1 ? false : pipe_on_line) || (lines.last =~ /^#{TABLE_PIPE_CHECK}/o)
end
end
@src.revert_pos(saved_pos) and return false unless pipe_on_line
add_container.call(has_footer ? :tfoot : :tbody, false) unless rows.empty?