| causes location to be off by one for all following elements
If you parse the following:
(similar variations work also, such as
Simple test case:
I believe this is related to a failed attempt to parse this as a table, and then somehow messing up the parser's idea of what the current line number is. It looks like the line number is being incorrectly increased/reset at this point: https://github.com/gettalong/kramdown/blob/master/lib/kramdown/parser/kramdown/table.rb#L69 but I'm still looking to see if I can identify exactly what is happening.
Edit: this is with kramdown 1.3.3
The text was updated successfully, but these errors were encountered:
I believe what's happening here is that in the reset_env call, @src.current_line_number is called with pos (and so the point at which scanning for newlines stops) far ahead of the point where the parse_table method was called (and presumably on a new line). When this method exits, @src.pos is reset to orig_pos. However, @src.current_line_number incremented an internal counter, which doesn't get reset.