-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
New Markdown parser #2156
Comments
Markdown table support would be terrific! |
An FYI: markdown-it-py only supports Python 3.7 or above. Consequently, to achieve the requirements, the Python version specified in |
That may be a step I'm willing to take! |
markdown-it-py v2.1.0 is the only markdown-it-py version without Python 3.6 support. Unless there's a reason that rich must pin to the newest release or later, markdown-it-py dependency will work fine for Python 3.6 users too. A dependency resolver (such as pip's) will simply fetch a supported dependency version. No need to drop Python 3.7 for this IMO (although it may make a lot of sense for other reasons). |
Just want to add that MD tables would be a great addition. I'm using rich-click and would love to use tables in my command usage output. |
Another parser to recommend: marko. It supports Python 3.6 and supports the latest commonmark spec as well as GFM. It also has a good interface for custom render to render as rich output. It is a bit slower than markdown-it-py but should be good enough. |
@willmcgugan @kellyjonbrazil is there something new on that topic.
are mntioned here. The first one is referenced from commonmark's reposiftory. But that shoul not be the only reason to use it. Both look like potent candidates to me. But I guess that should be @willmcgugan call. Eager to hear your opinions |
Hi @42sol-eu! Not an endorsement, but just want to throw in there that I have used Mistune (https://mistune.readthedocs.io/en/latest/) in one of my projects and it seemed to be fairly extendable. I'm not sure how it compares to the others - I didn't have a chance to do a thorough comparison at the time when choosing it. I think one of the factors was its table support. Sorry to just add another option to your plate. :) Edit: Here is how I'm using mistune in |
This is now perhaps somewhat more pressing, as Some observations:
Over in the jupyter stack, we have stayed with Not sure if it's feasible, but given none of the above are/will be compatible with each other (much less extensible by each other's extensions), another tack might be to leave the door open for a "Bring Your Own Markdown Renderer" API, so |
We have a branch that uses markdown-it-py for the Markdown parser. It was on-hold because at the time Rich supported Python3.6 and MIP didn't. So in theory we should be able to get that working quite soon. |
The new parser will be in the next Rich release. It does not add table support - it just gets us to parity with all pre-existing features (although, it does add support for strikethrough text 🙂) |
I hope we solved your problem. If you like using Rich, you might also enjoy Textual |
commonmark is unmaintained and doesn't support tables, and other features.
We should replace it with a new Markdown parser, for the benefit of both Rich and Textual.
markdown-it-py was recommended.
The text was updated successfully, but these errors were encountered: