Skip to content

[BUG] Table cells with line breaks are not handled correctly #86

@bedesv

Description

@bedesv

Description

Location: Pull Request Discussion Page

Minimum Reproducible Example

GitHub native editor to better-comments-for-github editor

  1. Paste the following in the GitHub native editor

    • Markdown:
      | Column 1 | Column 2 |
      |--------|--------|
      | This cell has a<br>line break in it | This cell does not |
      | Still nothing in this cell | 1. This cell uses line breaks<br>2. to appear as a numbered list |
      
    • Preview:
      Image
  2. Switch to the better-comments-for-github editor using the "Enhance editor" button

    • ⚠️ The cells are shifted around like so:
      Image
  3. Save the comment

    • ⚠️ The comment displays as per the GitHub native editor preview, even though the better-comments-for-github editor was showing it incorrectly

better-comments-for-github editor to GitHub native editor

  1. In the better-comments-for-github editor, create a 2x3 table as shown:
    • Image
  2. Switch back the the GitHub native editor by clicking the "Back to default editor" button
    • ⚠️ The new line and new paragraph are removed and the text displays on a single line
    • ⚠️ The numbered list new line is kept and breaks the rest of the table
      Image
      | Column 1                                         | Column 2                                             |
      | ------------------------------------------------ | ---------------------------------------------------- |
      | This cell has a new line in it using Shift+Enter | This cell has a new paragraph just by pressing Enter |
      | 1. This cell has a numbered
      2. list in it        | This cell doesn't have anything                      |
      

Please provide a screenshot or a video to a minimal reproduction of the bug

No response

Which browsers have you used?

  • Chrome
  • Firefox
  • Safari
  • Edge

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions