If the html_to_native option is enabled, and an empty tag is found in a table cell, the parser crashes because the value of the node is nil.
Here's a test case:
| abc | def |
| ------ | --- |
| a<br>b | c |
The error occurs in Table#parse_table
while (c = root.children.shift)
lines = c.value.split(/\n/)
...
end
A simple nil check will fix the problem. I also recommend using a string instead of a regexp to split.
I'd be happy to submit a PR to correct this problem.
If the html_to_native option is enabled, and an empty tag is found in a table cell, the parser crashes because the value of the node is nil.
Here's a test case:
The error occurs in Table#parse_table
A simple nil check will fix the problem. I also recommend using a string instead of a regexp to split.
I'd be happy to submit a PR to correct this problem.