question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Markdown 3.2 and Pymdown Extensions 6.3 Released with code block changes

See original GitHub issue

I 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:closed
  • Created 4 years ago
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

8reactions
facelessusercommented, Feb 7, 2020

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 install mkdocs mkdocs-material, mkdocs will be installed first and install the latest Markdown which is incompatible, then it will install mkdocs-material which will cause a failure as the version of Markdown is wrong. For whatever reason, pip will not correct this.

So either just install mkdocs-material and other dependecies not already covered, or ensure you install the correct pymdown-extensions and markdown first:

python -m pip install "pymdown-extensions<6.3" "markdown<3.2" mkdocs mkdocs-material
3reactions
waylancommented, Feb 7, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found