-
Notifications
You must be signed in to change notification settings - Fork 5k
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 table alignment stopped working #3919
Comments
I believe this is a bug in marked+GFM: they are using obsolete HTML |
I'm not sure I understand what the current status on table alignment is in jupyter notebook... so please correct me if something is wrong. Also I commented here since this is the issue with the most recent activity about the not-working markdown table alignment. There is an effort to keep feature parity with the jupyterlab, which stops the Jupyter notebook from switching from marked to a different markdown renderer. Is there an intention to support custom table alignment this in the future? And as I understand it, there is the option of extending marked with a custom renderer in order to get custom alignment working? Another possible way to achieve this was given in the marked-issue where they discussed GFM-compliance: markedjs/marked#1211 (comment) Thank you for your clarifications! |
Here's a partial answer in the time I have right now. It's the other way around: JLab is keeping parity with the notebook, which prevents JupyterLab from switching to a different markdown renderer (if the notebook switched, lab would most likely do the same). But the bigger issue is that in reality, both the notebook and lab are keeping parity with the user expectations for millions of existing notebooks, which makes it hard for either to switch. |
Thanks, @ian-r-rose for your note above
Has anyone looked to see if that approach from JupyterLab would resolve this issue for Jupyter Notebook? |
@nealmcb I have a PR open that fixes this issue. It is not the same approach because the notebook was not broken in the same way that jupyterlab was. It completely omitted the alignment in the rendered output. The fix is essentially a patch to marked to use style instead of align (in the same way it was being blocked before but this time it modifies instead of removing the output) which takes precedence over a CSS default allowing jupyter to give the default of right alignment in CSS but markdown tables to override it if an alignment is specifically set. See #4130. |
This bug has been filed eight months ago and patched six months ago. When will this fix be available in a release? The most recent stable version does not contain this fix. |
All versions of 6.0.0+ appear to include the fix. |
In Jupyter, now it's always right aligned!
It's one thing enforce right-alignment for consistency reasons as described in /pull/2534. It's another to stop supporting features in Markdown as described by the link in the Help bar, currently pointing to:
https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/
https://help.github.com/articles/organizing-information-with-tables/#formatting-content-within-your-table
Furthermore, the user gets no messaging to let them know that they're using unsupported features, i.e. the :---, :---:, and ---: tokens to describe justification.
The text was updated successfully, but these errors were encountered: