nodebb-plugin-markdown icon indicating copy to clipboard operation
nodebb-plugin-markdown copied to clipboard

Markdown tables can't start with empty cells

Open awunnenb opened this issue 6 years ago • 5 comments

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

awunnenb avatar Oct 24 '18 08:10 awunnenb

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

pitaj avatar Oct 24 '18 14:10 pitaj

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 - : -

awunnenb avatar Oct 24 '18 16:10 awunnenb

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.

pitaj avatar Oct 24 '18 17:10 pitaj

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.

awunnenb avatar Oct 24 '18 18:10 awunnenb

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.

julianlam avatar Oct 24 '18 18:10 julianlam