Skip to content

Commit 8469fc5

Browse files
committed
Fix a highlight issue
Fix an issue where Highlight can override another extension in the "registered" list in Python Markdown.
1 parent 505d221 commit 8469fc5

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

docs/src/markdown/about/changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 10.17.1
4+
5+
- **FIX**: Fix an issue where Highlight can override another extension in the "registered" list in Python Markdown.
6+
37
## 10.17
48

59
- **NEW**: Allow specifying static IDs in caption block headers via `#id` syntax.

pymdownx/__meta__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,5 +193,5 @@ def parse_version(ver: str) -> Version:
193193
return Version(major, minor, micro, release, pre, post, dev)
194194

195195

196-
__version_info__ = Version(10, 17, 0, "final")
196+
__version_info__ = Version(10, 17, 1, "final")
197197
__version__ = __version_info__._get_canonical()

pymdownx/blocks/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ def register(self, b: type[Block], config: dict[str, Any]) -> None:
221221
raise ValueError(f'The block name {b.NAME} is already registered!')
222222
self.blocks[b.NAME] = b
223223
self.config[b.NAME] = config
224+
self.trackers[b.NAME] = {}
224225

225226
def test(self, parent: etree.Element, block: str) -> bool:
226227
"""Test to see if we should process the block."""

pymdownx/highlight.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,7 @@ def extendMarkdown(self, md):
589589
if isinstance(ext, HighlightExtension):
590590
register = not ext.enabled and self.enabled
591591
break
592+
index += 1
592593

593594
if register is None:
594595
register = True

0 commit comments

Comments
 (0)