You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My Markdown configuration via Pelican is like this (note 'pygments_style': 'native'):
MARKDOWN = {
'output_format': 'html5',
'extension_configs': {
'markdown.extensions.admonition': {},
'markdown.extensions.codehilite': {
'css_class': 'highlight',
'noclasses': True,
'pygments_style': 'native',
},
'markdown.extensions.extra': {},
'markdown.extensions.meta': {},
# Enable permalink on headings.
# Note: value set to a space, so that the symbol doesn't become
# part of the RSS feed as per recommendation.
# https://elegant.oncrashreboot.com/permalinks-to-headings
'markdown.extensions.toc': {'permalink': ' '},
},
}
With the upgrade of the Markdown package from 3.2.2 to 3.3.any, the highlighting of any subsequent blocks after the first would be 'default' instead of 'native': 🤔
The commit 10058fa (Refactor fenced_code & codehilite options) seems to have introduced a 'pop' rather than proper 'get' from the local configuration in the sequence of blocks, resulting in this behaviour.
This fixes a bug where any subsequent highlighted block with codehilite
would result in the omission of the style setting, because it was popped
off the dict. It would then fall back to pygments_style 'default' after
the first block.
Fixes#1240
I have tracked down a bug and written a fix for this, wanted to explain the issue in an Issue. PR: #1241.
I'm running a small static blog using Pelican, the Elegant theme and I have enabled the Markdown plugin to do code highlighting for me.
My Markdown configuration via Pelican is like this (note
'pygments_style': 'native'
):With the upgrade of the Markdown package from 3.2.2 to 3.3.any, the highlighting of any subsequent blocks after the first would be 'default' instead of 'native': 🤔
The commit 10058fa (Refactor fenced_code & codehilite options) seems to have introduced a 'pop' rather than proper 'get' from the local configuration in the sequence of blocks, resulting in this behaviour.
markdown/markdown/extensions/codehilite.py
Lines 238 to 245 in 383de86
The text was updated successfully, but these errors were encountered: