Markdown 3.2 and Pymdown Extensions 6.3 Released with code block changes
See original GitHub issueI checked that…
- … the documentation does not mention anything about my idea
- … to my best knowledge, my idea wouldn’t break something for other users
- … there are no open or closed issues that are related to my idea
Description
Markdown 3.2 and Pymdown Extensions 6.3 were just released. This forces Pygments code blocks to always be wrapped in code blocks: <div><pre><code></code></pre></div>. This is different that the previous <div><pre></pre></div> convention.
Pymdown already accounts for this in its own documents, and all that was needed is:
/* Handled pre with wrapped code */
div.codehilite > pre {
padding: 0;
}
If you don’t get to it first, I’ll try to come up with a pull, but wanted to at least create an issue now.
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (9 by maintainers)
Top Results From Across the Web
Changelog - PyMdown Extensions Documentation
NEW: pymdownx.extrarawhtml is now deprecated in favor of Python Markdown's md_in_html extension found in the 3.2 release. NEW: When using Pygments 2.4+, code...
Read more >squidfunk/mkdocs-material - Gitter
Note that the way CodeHilite blocks are wrapped changed. For this reason make sure that you are on the latest versions of Markdown...
Read more >pymdown-extensions - PyPI
Extension pack for Python Markdown. ... Released: Nov 23, 2022 ... documentation is found here: https://facelessuser.github.io/pymdown-extensions/.
Read more >PyMdown Extensions - ML-Hispano @ Github
PyMdown Extensions is a collection of Markdown extensions that add some great features to the standard Markdown library. For this reason, the installation ......
Read more >Material for MkDocs - GitHub
2.4 Changing the logo and icons ... Fixed code blocks after Markdown 3.2 release ... Added support for Details from PyMdown Extensions package....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Okay, I tested this out in a virtual environment. If you install just
mkdocs-material, you will get all the needed requirements and things will work. If you installmkdocs mkdocs-material,mkdocswill be installed first and install the latest Markdown which is incompatible, then it will installmkdocs-materialwhich will cause a failure as the version of Markdown is wrong. For whatever reason, pip will not correct this.So either just install
mkdocs-materialand other dependecies not already covered, or ensure you install the correct pymdown-extensions and markdown first:In case you missed it, as per mkdocs/mkdocs#1970, the next release of MkDocs will require Markdown 3.2. Just thought you guys would want to know that so you can plan for it.