Creating a table sometimes insert empty lines between rows, breaking the table

Empty lines will be added inside the table layout if there are empty lines below the line on which we’re going to use the table builder.

No issue:

If there’s a line (empty or not, it doesn’t matter) directly below the table builder’s line, there will be an empty line just below the header’s separator:

:information_source: Multiple filled lines below each other will trigger the same behavior: only one empty line will be added below the header’s separator in the table layout.

However, if there are multiple empty lines below the table builder’s line, there will be additional empty lines in the table layout, between the body’s rows.

For example, if there are 3 empty lines below, there will be a total of 3 empty lines in the table’s layout.
One under the separator, and one between the first two table body’s rows:

6 Likes

I’m reporting this bug that has been noticed and reported a while ago but isn’t fixed yet so that it can be tracked more easily. :slight_smile:


Empty lines will be added inside the table layout if there are empty lines below the line on which we’re going to use the table builder.

No issue:

If there’s a line (empty or not, it doesn’t matter) directly below the table builder’s line, there will be an empty line just below the header’s separator:

:information_source: Multiple filled lines below each other will trigger the same behavior: only one empty line will be added below the header’s separator in the table layout.

However, if there are multiple empty lines below the table builder’s line, there will be additional empty lines in the table layout, between the body’s rows.

For example, if there are 3 empty lines below, there will be a total of 3 empty lines in the table’s layout.
One under the separator, and one between the first two table body’s rows:

2 Likes

When using the table editor feature, it sometimes adds blank lines between every row in the table for no apparent reason. This results in confusing edit history, as it adds these lines automatically and then people remove them manually (wiki post). For example:

Table for testing:

Column 1 Column 2 Column 3
Row 1 val 1 Row 1 val 2 Row 1 val 3
Row 2 val 1 Row 2 val 2 (modified with editor) Row 2 val 3
Row 3 val 1 Row 3 val 2 Row 3 val 3

I’m unsure of the exact steps to reproduce, as editing an entry here didn’t cause it, but it happens frequently on the wiki post here.

1 Like

I wanted to follow up on this, as it’s still a problem. Is there any plan to look into this?

I think we have an existing bug topic on this with a pr-welcome tag?

Let me see if I can tidy things up…

2 Likes

I’ve just been tripped up by this in my instance when creating a new table, but it doesn’t seem to happen here in Meta.

Actually - yes it does!!!

|Column 1 | Column 2|

|— | —|

|testing | testing|
|testing | testing|

The key issue is if that it happens when the cursor is not at the very bottom of the post.

3 Likes

After my investigation, this seems to be caused by arrayToTable using \r\n :thinking:

In my experience on Windows, using just \n fixes this problem. But I’m not sure if it will work on Mac. :face_holding_back_tears:

2 Likes

This should fix this bug:

6 Likes

This topic was automatically closed after 3 days. New replies are no longer allowed.