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

Tables in Markdown previewer #71

Open
philippconzett opened this issue Jun 23, 2024 · 9 comments · May be fixed by #76
Open

Tables in Markdown previewer #71

philippconzett opened this issue Jun 23, 2024 · 9 comments · May be fixed by #76

Comments

@philippconzett
Copy link

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!

@pdurbin
Copy link
Member

pdurbin commented Jul 8, 2024

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.

@philippconzett
Copy link
Author

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

@gwendoux
Copy link

gwendoux commented Jul 9, 2024

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.

@ErykKul ErykKul linked a pull request Jul 9, 2024 that will close this issue
@ErykKul
Copy link

ErykKul commented Jul 9, 2024

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

image

@ErykKul
Copy link

ErykKul commented Jul 9, 2024

After merging to master all previewers are auto-updated, e.g.:

git cherry-pick 86ddd14b2b4393f5ff053e68a43fab811740d817 8ca549dd9ea1147438692ac6866a9013a3419381

@pdurbin
Copy link
Member

pdurbin commented Jul 9, 2024

@ErykKul seems like a good fix to me! @philippconzett @gwendoux what do you think?

@philippconzett
Copy link
Author

Looks good to me. Thanks for fixing this!

@gwendoux
Copy link

It's good enough👍. A simple tweak on the css part could fix the "looks good" later ;)

@gwendoux
Copy link

@ErykKul Here is a good source for replicating GitHub Markdown style https://github.com/sindresorhus/github-markdown-css

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

Successfully merging a pull request may close this issue.

4 participants