Pasting Google Sheets table with a cell that contain a line break

Pasting a table from Google Sheets does not format as a table if any of the cells contain a line break. This was working properly a few months ago, but now it seems that markdown doesn’t recognize it as a table. This happens regardless of whether I directly use a line break or CHAR(10) in the workbook cell/formula. Any time I have a line break in a cell, discourse/markdown is adding quotes around the cell contents and not giving me the vertical bars for table formatting.

Previously, I was using a line break in a cell to add a blank row based on a conditional (in this example, I’m adding a blank row under the test1 row by adding a string “|”&CHAR(10)&"|-" )

image

Which looks like this:

Sheep Score # Solos Used
test 0 0
-
test1 0 0
test2 0 0

But now it’s doing this:

Sheep Score # Solos Used
test 0 0
test1 0 “0|
|-”
test2 0 0

4 Likes

I can reproduce the bug with Google Sheets, along with Microsoft Excel and Apple Numbers.

2 Likes

The issue was fixed with that PR

https://github.com/discourse/discourse/pull/12194