diff --git a/docs/src/markdown/about/changelog.md b/docs/src/markdown/about/changelog.md index c795e9316..7da14ee09 100644 --- a/docs/src/markdown/about/changelog.md +++ b/docs/src/markdown/about/changelog.md @@ -1,5 +1,9 @@ # Changelog +## 10.14.2 + +- **FIX**: FancyLists: Fix case were lists could be falsely created when a line started with `.` or `)`. + ## 10.14.1 - **FIX**: MagicLink: Ensure that repo names that start with `.` are handled correctly. diff --git a/pymdownx/__meta__.py b/pymdownx/__meta__.py index 6fbcfb922..3f8d22539 100644 --- a/pymdownx/__meta__.py +++ b/pymdownx/__meta__.py @@ -185,5 +185,5 @@ def parse_version(ver, pre=False): return Version(major, minor, micro, release, pre, post, dev) -__version_info__ = Version(10, 14, 1, "final") +__version_info__ = Version(10, 14, 2, "final") __version__ = __version_info__._get_canonical() diff --git a/pymdownx/fancylists.py b/pymdownx/fancylists.py index 79e7e0791..88cafe150 100644 --- a/pymdownx/fancylists.py +++ b/pymdownx/fancylists.py @@ -109,7 +109,8 @@ def __init__(self, parser, config): (?:C[MD]|D(?:C{0,4}|C{5}\b)|(?:C{0,9}|C{10}\b)) (?:X[CL]|L(?:X{0,4}|X{5}\b)|(?:X{0,9}|X{10}\b)) (?:I[XV]|V(?:I{0,4}|I{5}\b)|(?:I{0,9}|I{10}\b)) - | m* + | (?=[ivxlcdm]) + m* (?:c[md]|d(?:c{0,4}|c{5}\b)|(?:c{0,9}|c{10}\b)) (?:x[cl]|l(?:x{0,4}|x{5}\b)|(?:x{0,9}|x{10}\b)) (?:i[xv]|v(?:i{0,4}|i{5}\b)|(?:i{0,9}|i{10}\b)) diff --git a/tests/test_extensions/test_fancylists.py b/tests/test_extensions/test_fancylists.py index f50cd4fa0..4bc1f341f 100644 --- a/tests/test_extensions/test_fancylists.py +++ b/tests/test_extensions/test_fancylists.py @@ -8,6 +8,30 @@ class TestFancyLists(util.MdCase): extension = ['pymdownx.fancylists', 'pymdownx.saneheaders'] extension_configs = {} + def test_fail_case(self): + """Test failed case.""" + + self.check_markdown( + """ + 1. foo + . bar + + 1) foo + ) bar + """, + """ +