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 tables can't start with empty cells #92

Open
awunnenb opened this issue Oct 24, 2018 · 5 comments
Open

Markdown tables can't start with empty cells #92

awunnenb opened this issue Oct 24, 2018 · 5 comments

Comments

@awunnenb
Copy link

NodeBB version: 1.10.2
nodebb-plugin-markdown: 8.8 (latest)
**NodeBB git hash: ab7657d **
Database type: mongo
Database version: 3.6
First I did this: upgrade to 1.10.2
Then, all existing and new Markdown tables with empty first cells where broken
What you expected: empty first cells
**What happened instead: cells moved to left side **
Markdown tables can't start with empty cells since nodebb 1.10.2 / plugin 8.8

downgrade to 1.10.1 / plugin 8.4 solves the problem

@pitaj
Copy link
Collaborator

pitaj commented Oct 24, 2018

Can you provide an example which used to work and no longer does? Put it in a code block please

@awunnenb
Copy link
Author

awunnenb commented Oct 24, 2018

Datum | Zeit | Heim | Gast | Ergebnis |  
--- | --- | --- |  --- | --- |  
26.10.2018 | 18:30 | SV Darmstadt 98 | SpVgg Greuther Fürth | - : - | 
 | **18:30** | **1. FC Magdeburg** | **Hamburger SV** | **- : -** | 
27.10.2018 | 13:00 | 1. FC Köln | 1. FC Heidenheim 1846 | - : - | 
 | 13:00 | Erzgebirge Aue | Arminia Bielefeld | - : - | 
 | 13:00 | SC Paderborn 07 | SV Sandhausen | - : - | 
28.10.2018 | 13:30 | 1. FC Union Berlin | Dynamo Dresden | - : - | 
 | 13:30 | FC Ingolstadt 04 | MSV Duisburg | - : - | 
 | 13:30 | FC St. Pauli | Holstein Kiel | - : - | 
29.10.2018 | 20:30 | VfL Bochum | Jahn Regensburg | - : - | 

Formatted

Datum Zeit Heim Gast Ergebnis
26.10.2018 18:30 SV Darmstadt 98 SpVgg Greuther Fürth - : -
18:30 1. FC Magdeburg Hamburger SV - : -
27.10.2018 13:00 1. FC Köln 1. FC Heidenheim 1846 - : -
13:00 Erzgebirge Aue Arminia Bielefeld - : -
13:00 SC Paderborn 07 SV Sandhausen - : -
28.10.2018 13:30 1. FC Union Berlin Dynamo Dresden - : -
13:30 FC Ingolstadt 04 MSV Duisburg - : -
13:30 FC St. Pauli Holstein Kiel - : -
29.10.2018 20:30 VfL Bochum Jahn Regensburg - : -

@pitaj
Copy link
Collaborator

pitaj commented Oct 24, 2018

You had an inline code segment but I fixed it to a code block. It appears that the formatting you're describing is equal to what GitHub does.

@awunnenb
Copy link
Author

awunnenb commented Oct 24, 2018

there where some changes from nodebb 1.10.1 to 1.10.2 (plugin 8.4 -> 8.8) and we have hundred of broken tables since these changes. In the old version a blank and | at the beginning was interpreted as an empty cell.

@julianlam
Copy link
Member

It looks like this is governed by our upstream markdown parser (markdown-it)...

If I put   before the |, it seems to work fine then... I'd advise you to open an issue at the markdown-it repo and link back to here for continued discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants