-
-
Notifications
You must be signed in to change notification settings - Fork 902
Introduce Markdown.default_extras
#5610
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
base: main
Are you sure you want to change the base?
Conversation
|
Well but to what end? Do all elements will have many We may need a more systematic solution, otherwise we are pushing out a non-scalable API out to a single element which we have hard time withdrawing (not until 4.0) |
|
Oh I have an idea now All elements will expose The This way we do not add N classvars for an element which takes N arguments. |
|
Hm, there's another pattern we could use:
Most of these variables are mostly for internal use ( Should we keep uppercase class vars for internals and deprecate Or maybe the assumption that "all elements will have many Let's summarize our options so far:
|
Just to be clear, me neither. But I am not sure if it is a legal move mypy-speaking but can elements define their own Maybe a good idea to try something out and see how mypy reacts because I am not too familiar with classes to know if this is a legal move or not. |
|
Be sure to check out #5643 as well. |
No it's not. VSCode complaints, so mypy must be very upset. |
Motivation
In #5548, it was requested to set by-default the markdown extras, citing the influx of LLMs which forgets to add newline for a markdown list as the need driver.
Implementation
It is not possible to offer the
ui.markdown.extrasAPI sinceextrasalready exists per-instance. I did the next best thing:ui.markdown.default_extras.Progress
tests/test_markdown.py