Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown ignores empty table cells #11547

Closed
gektor-de opened this issue Nov 6, 2018 · 3 comments · Fixed by #14137
Closed

Markdown ignores empty table cells #11547

gektor-de opened this issue Nov 6, 2018 · 3 comments · Fixed by #14137
Labels
[Block] Table Affects the Table Block [Feature] Paste [Type] Bug An existing feature does not function as intended
Milestone

Comments

@gektor-de
Copy link

Description

When pasting markdown tables with empty cells, those cells are being ignored.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://www.tablesgenerator.com/markdown_tables
  2. Generate a table or use the following example:
|   |      | Text  |       |      |
|---|------|-------|-------|------|
|   |      |       |       | Text |
|   | Text |       |       |      |
|   |      | Text1 | Text2 |      |

This should render to:

Text
Text
Text
Text1 Text2
  1. Copy and paste to an empty Gutenberg page or post
  2. See error:
    image

Expected behavior

Tables should be parsed from markdown correctly, as they do for example in github or gitlab environments.

Desktop

  • Browser: Tested in latest Chrome and Firefox

Additional context

  • Gutenberg Version: 4.1.1
@designsimply designsimply added the Needs Testing Needs further testing to be confirmed. label Nov 6, 2018
@designsimply
Copy link
Member

Tested and confirmed the results of the test based on the steps provided using WordPress 4.9.8 and Gutenberg 4.2.0-rc.1 with Firefox 63.0 on macOS 10.13.6.

I also tested the table example on a few different markdown preview sites such as https://dillinger.io/ and https://markdown-it.github.io/ and https://markdownlivepreview.com/ and found that the table was process correctly in 2 of the 3.

@designsimply designsimply added [Type] Bug An existing feature does not function as intended [Feature] Paste and removed Needs Testing Needs further testing to be confirmed. labels Nov 6, 2018
@GlennMartin1
Copy link

This bug makes the Table block unusable at this point.

I have Google Sheets tables that include occasional blank cells, and pasting it makes a mess.

@mtias mtias added this to the WordPress 5.0.x Follow Ups milestone Nov 21, 2018
@mtias mtias added the [Block] Table Affects the Table Block label Nov 21, 2018
@imsimond
Copy link

imsimond commented Jan 8, 2019

I'm seeing the same problem when copying an HTML table containing empty <td></td> cells from a web page into a Gutenberg block. See also #8953

Original HTML markup of a simple page:

markup

Renders successfully in browser (here, Chrome 71 on Mac):

table_with_a_blank_cell

Copied and pasted into Gutenberg (here, WP 5.0.2):

g-visual

'Edit as HTML' view within Gutenberg shows the empty cell has been removed:

g-codeview

Verified in both Chrome and Firefox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Table Affects the Table Block [Feature] Paste [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants