Open philippconzett opened 4 months ago
Hmm, tables are non-standard in Markdown so I'm not super surprised they don't "just work".
@philippconzett which table syntax are you using?
@ErykKul added the Markdown previewer in #23 and might know offhand if tables are supported.
Ah, thanks, @pdurbin, I didn't know. If I remember correctly, I the file I previewed had a table like this:
Row1 | Row2 | Row3 | Row4 | Row4 |
---|---|---|---|---|
Cell1 | Cell2 | Cell3 | Cell4 | Cell5 |
Cell6 | Cell7 | Cell8 | Cell9 | Cell10 |
Markdown is a markup language of fairly limited design (intended by creator Daring Fireball's Gruber). We're used to using markdowns, extended versions such as Github's flavor, which have implemented quite a few functions. The dataverse previewer seems to use a standard implementation.
I made a PR to add support for tables. They do not look very good, but it works (tested on our pilot env with a README.md from GitHub):
After merging to master all previewers are auto-updated, e.g.:
git cherry-pick 86ddd14b2b4393f5ff053e68a43fab811740d817 8ca549dd9ea1147438692ac6866a9013a3419381
@ErykKul seems like a good fix to me! @philippconzett @gwendoux what do you think?
Looks good to me. Thanks for fixing this!
It's good enough👍. A simple tweak on the css part could fix the "looks good" later ;)
@ErykKul Here is a good source for replicating GitHub Markdown style https://github.com/sindresorhus/github-markdown-css
I've been testing file previewers v1.4 in our Dataverse test environment (v6.2). When opening a Markdown file (.md) in the Markdown previewer, tables are not displayed as tables but as plain text. The tables look fine in Markdown editors, e.g., https://stackedit.io/app#. Maybe there is a bug in the previewer? Thanks for considering this input!