diff --git a/fix-toc-list-check.patch b/fix-toc-list-check.patch new file mode 100644 index 0000000..1a298d3 --- /dev/null +++ b/fix-toc-list-check.patch @@ -0,0 +1,12 @@ +Index: pymdown-extensions-10.7.1/tests/test_extensions/test_smartsymbols.py +=================================================================== +--- pymdown-extensions-10.7.1.orig/tests/test_extensions/test_smartsymbols.py ++++ pymdown-extensions-10.7.1/tests/test_extensions/test_smartsymbols.py +@@ -139,4 +139,6 @@ class TestSmartSymbols(util.MdCase): + + md = markdown.Markdown(extensions=['toc', 'pymdownx.smartsymbols']) + md.convert('# *Foo* =/= `bar`') +- self.assertEqual(md.toc_tokens, [{'level': 1, 'id': 'foo-bar', 'name': 'Foo ≠ bar', 'children': []}]) ++ contains = {'level': 1, 'id': 'foo-bar', 'name': 'Foo ≠ bar', 'children': []} ++ self.assertEqual(len(md.toc_tokens), 1) ++ self.assertLessEqual(contains.items(), md.toc_tokens[0].items()) diff --git a/python-pymdown-extensions.changes b/python-pymdown-extensions.changes index b6e9727..0911d65 100644 --- a/python-pymdown-extensions.changes +++ b/python-pymdown-extensions.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Mar 22 02:46:48 UTC 2024 - Steve Kowalik + +- Add patch fix-toc-list-check.patch: + * Assert toc_tokens is a superset of what we are looking for. + ------------------------------------------------------------------- Sat Mar 16 12:52:41 UTC 2024 - Dirk Müller diff --git a/python-pymdown-extensions.spec b/python-pymdown-extensions.spec index adb8ce6..f6816ae 100644 --- a/python-pymdown-extensions.spec +++ b/python-pymdown-extensions.spec @@ -23,6 +23,8 @@ Summary: Extension pack for Python Markdown License: MIT URL: https://github.com/facelessuser/pymdown-extensions Source: https://github.com/facelessuser/pymdown-extensions/archive/refs/tags/%{version}.tar.gz#/pymdown-extensions-%{version}.tar.gz +# PATCH-FIX-OPENSUSE Assert toc_tokens is a superset of what we want to check +Patch0: fix-toc-list-check.patch BuildRequires: %{python_module Markdown >= 3.2} BuildRequires: %{python_module hatchling} BuildRequires: %{python_module pip} @@ -47,7 +49,7 @@ Covering a wide range of solutions, and while not every extension is needed by all people, there is usually at least one useful extension for anybody. %prep -%setup -q -n pymdown-extensions-%{version} +%autosetup -p1 -n pymdown-extensions-%{version} %build %pyproject_wheel