Skip to content

Commit b50d15a

Browse files
authored
Caption pattern should match a literal dot (#2717)
1 parent f64422f commit b50d15a

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
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.16.1
4+
5+
- **FIX**: Inefficient regular expression pattern for figure caption numbers.
6+
37
## 10.16
48

59
- **NEW**: Add early support for Python 3.14.

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, 16, 0, "final")
196+
__version_info__ = Version(10, 16, 1, "final")
197197
__version__ = __version_info__._get_canonical()

pymdownx/blocks/caption.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from markdown.treeprocessors import Treeprocessor
3232
import re
3333

34-
RE_FIG_NUM = re.compile(r'^(\^)?([1-9][0-9]*(?:.[1-9][0-9]*)*)(?= |$)')
34+
RE_FIG_NUM = re.compile(r'^(\^)?([1-9][0-9]*(?:\.[1-9][0-9]*)*)(?= |$)')
3535
RE_SEP = re.compile(r'[_-]+')
3636

3737

0 commit comments

Comments
 (0)