-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Add function and tests for markdown chunks using pygment langs like {.py
and {.python
etc
#282
base: main
Are you sure you want to change the base?
Conversation
…{.py` and `{.python` etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There’s quite a lot of overlap here with #239, the MyST support. I will defer a proper review for now since I want to dive into understanding both formats to understand how to keep things easy to understand.
The full regex in the (?P<before>^(?P<indent> *)```\s*(\{?\s*)?(\.?)?(python|py|sage|python3|py3|numpy)( .*?)?\n)(?P<code>.*?)(?P<after>^(?P=indent)```\s*$) If you plug this in to https://regex101.com/, it will give you the following explanation for the 3rd and 4th capture group: 3rd Capturing Group
4th Capturing Group
This should now meet the needs of both MyST and the Pygment langs used in pymdown-extensions. |
Hi @adamchainz, just wondering if there is anything else that I can do to support this PR? |
Closes #281