From 255ff61e1eff5c048b6e4771efd5b13306174916e7e6077945c95cac162da8a8 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 28 Apr 2025 14:07:59 +0000 Subject: [PATCH] - update to 10.15: * **NEW**: SuperFences: Add `relaxed_headers` option which can tolerate bad content in the fenced code header. When enabled, code blocks with bad content in the header will likely still convert into code blocks, often respecting the specified language. * **NEW**: Add type hints to the Blocks interface and a few additional files. * **FIX**: Blocks: Fix some corner cases of nested blocks with lists. * **FIX**: Tab and Tabbed: Fix a case where tabs could fail if `combine_header_slug` was enabled and there was no header. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pymdown-extensions?expand=0&rev=28 --- .gitattributes | 23 +++ .gitignore | 1 + fix-toc-list-check.patch | 12 ++ pymdown-extensions-10.12.tar.gz | 3 + pymdown-extensions-10.13.tar.gz | 3 + pymdown-extensions-10.14.2.tar.gz | 3 + pymdown-extensions-10.14.3.tar.gz | 3 + pymdown-extensions-10.15.tar.gz | 3 + pymdown-extensions-10.7.1.tar.gz | 3 + python-pymdown-extensions.changes | 243 ++++++++++++++++++++++++++++++ python-pymdown-extensions.spec | 73 +++++++++ 11 files changed, 370 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 fix-toc-list-check.patch create mode 100644 pymdown-extensions-10.12.tar.gz create mode 100644 pymdown-extensions-10.13.tar.gz create mode 100644 pymdown-extensions-10.14.2.tar.gz create mode 100644 pymdown-extensions-10.14.3.tar.gz create mode 100644 pymdown-extensions-10.15.tar.gz create mode 100644 pymdown-extensions-10.7.1.tar.gz create mode 100644 python-pymdown-extensions.changes create mode 100644 python-pymdown-extensions.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc 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/pymdown-extensions-10.12.tar.gz b/pymdown-extensions-10.12.tar.gz new file mode 100644 index 0000000..71a63c1 --- /dev/null +++ b/pymdown-extensions-10.12.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b9c8eb98a4175447aed6a63572d01526dd9063efa13106cf71adc6bf29a0ad7 +size 1126653 diff --git a/pymdown-extensions-10.13.tar.gz b/pymdown-extensions-10.13.tar.gz new file mode 100644 index 0000000..db73586 --- /dev/null +++ b/pymdown-extensions-10.13.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44bdc51b81508a5d4ff9f3c217cf7966a1ea37b9132e53bc79e2ea068c0c6ab8 +size 1129075 diff --git a/pymdown-extensions-10.14.2.tar.gz b/pymdown-extensions-10.14.2.tar.gz new file mode 100644 index 0000000..2bd2d32 --- /dev/null +++ b/pymdown-extensions-10.14.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d827f07d9152b0f4cd4bcc7ae87f737f27bb36822686bbd26dae2e393a611d7d +size 1128438 diff --git a/pymdown-extensions-10.14.3.tar.gz b/pymdown-extensions-10.14.3.tar.gz new file mode 100644 index 0000000..1f6efea --- /dev/null +++ b/pymdown-extensions-10.14.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e902ef07324660a3b9f8215e75d82cd2b291bf4cc9a1a108355dfa70c0c2433 +size 1128547 diff --git a/pymdown-extensions-10.15.tar.gz b/pymdown-extensions-10.15.tar.gz new file mode 100644 index 0000000..2cf9e94 --- /dev/null +++ b/pymdown-extensions-10.15.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c4ba1c52da708aa37a87c1a717ed754d2bf3ae78731ea2b0dbec02d54965c38b +size 1136565 diff --git a/pymdown-extensions-10.7.1.tar.gz b/pymdown-extensions-10.7.1.tar.gz new file mode 100644 index 0000000..c02e285 --- /dev/null +++ b/pymdown-extensions-10.7.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:065d6a7844b79d729a52e02717a79309b45158904b305c5fa350266e5256b59b +size 1098210 diff --git a/python-pymdown-extensions.changes b/python-pymdown-extensions.changes new file mode 100644 index 0000000..9590306 --- /dev/null +++ b/python-pymdown-extensions.changes @@ -0,0 +1,243 @@ +------------------------------------------------------------------- +Mon Apr 28 14:07:33 UTC 2025 - Dirk Müller + +- update to 10.15: + * **NEW**: SuperFences: Add `relaxed_headers` option which + can tolerate bad content in the fenced code header. When + enabled, code blocks with bad content in the header will + likely still convert into code blocks, often respecting + the specified language. + * **NEW**: Add type hints to the Blocks interface and a few + additional files. + * **FIX**: Blocks: Fix some corner cases of nested blocks + with lists. + * **FIX**: Tab and Tabbed: Fix a case where tabs could fail + if `combine_header_slug` was enabled and there was no + header. + +------------------------------------------------------------------- +Mon Feb 3 16:27:25 UTC 2025 - Benoît Monin + +- update to 10.14.3: + * FIX: Blocks: An empty, raw block type should not cause an error + +------------------------------------------------------------------- +Thu Jan 30 17:10:59 UTC 2025 - Benoît Monin + +- update to 10.14.2: + * FIX: Blocks: Fix some corner cases with md_in_html. + +------------------------------------------------------------------- +Wed Jan 22 19:33:20 UTC 2025 - Benoît Monin + +- update to 10.14.1: + * FIX: MagicLink: Ensure that repo names that start with . are + handled correctly. + * FIX: FancyLists: Fix case were lists could be falsely created + when a line started with . or ). + +------------------------------------------------------------------- +Sat Jan 18 15:52:16 UTC 2025 - ecsos + +- Add %{?sle15_python_module_pythons} +- Fix build requires versions. + +------------------------------------------------------------------- +Wed Jan 8 20:08:07 UTC 2025 - Benoît Monin + +- update to 10.14: + * NEW: Blocks.HTML: Add new custom option to specify tags and the + assumed handling for them when automatic mode is assumed. This + can also be used to override the handling for recognized tags + with automatic handling. + * FIX: Fix tests to pass with Pygments 2.19+. + +------------------------------------------------------------------- +Mon Dec 23 19:32:33 UTC 2024 - Benoît Monin + +- update to 10.13: + * NEW: Snippets: Allow multiple line numbers or line number + blocks separated by ,. + * NEW: Snippets: Allow using a negative index for number start + indexes and end indexes. Negative indexes are converted to + positive indexes based on the number of lines in the snippet. + * FIX: Snippets: Properly capture empty newline at end of file. + * FIX: Snippets: Fix issue where when non sections of files are + included, section labels are not stripped. + * FIX: BetterEm: Fixes for complex cases. + * FIX: Blocks: More consistent handling of empty newlines in + block processor extensions + +------------------------------------------------------------------- +Sun Nov 3 02:33:53 UTC 2024 - Steve Kowalik + +- Update to 10.12: + * NEW: Blocks: Blocks extensions no longer considered in beta. + * NEW: Details: Details is marked as "legacy" in documentation in favor + of the new pymdownx.blocks.details approach. + * NEW: Tabbed: Tabbed is marked as "legacy" in documentation in favor of + the new pymdownx.blocks.tab approach. + * NEW: Caption: Add new "blocks" style extension called Caption which + helps with specifying figures with captions. + * NEW: Emoji: Add a new strict option that will raise an exception if an + emoji is used whose name has changed, removed, or never existed. + * FIX: Emoji: Emoji links should be generated such that they point to the + new CDN version. + * FIX: SuperFences: Fix a regression where certain patterns could cause + a hang. + * FIX: SuperFences: Fix regression where an omitted language in conjunction + with options in the fenced header can cause a fence to not be parsed. + * FIX: BetterEm: Add better support for *em, **em,strong*** and _em, + __em,strong___ cases. + * FIX: Caret: Add better support for *sup, **sup,ins***. + * FIX: Tilde: Add better support for *sub, **sub,del***. + * FIX: FancyLists: Remove a mistaken semicolon from injected classes. + * NEW: FancyLists: Add new FancyLists extension. + * NEW: Emoji: Update Twemoji data to the latest. + * FIX: PathConverter: Fixes for latest changes in Python regarding + urlunparse. + * NEW: Officially support Python 3.13. + * FIX: Snippets: Better handling of cases where URL snippet requests + contain no header length. + * FIX: Snippets: Fix snippet line range with a start of line 1. + * NEW: Require Python Markdown 3.6+. + * FIX: Fix some test cases. + * FIX: Fix warnings due to recent changes in Python Markdown. +- Drop patch fix-toc-list-check.patch, no longer required. + +------------------------------------------------------------------- +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 + +- update to 10.7.1: + * SmartSymbols: Ensure symbols are properly translated in table + of content tokens. + +------------------------------------------------------------------- +Sun Dec 31 13:42:23 UTC 2023 - Dirk Müller + +- update to 10.7: + * NEW: Emoji: Update Twemoji and Gemoji data to latest. + * NEW: Emoji: Due to recent Gemoji update, non-standard emoji + are no longer indexed. So emoji such as :octocat: are no + longer resolved. + * NEW: Highlight: Added new option default_lang which will + cause code blocks with no language specifier to be + highlighted with the specified default language instead of + plain text. This affects indented code blocks and code blocks + defined with SuperFences. + * NEW: InlineHilite: style_plain_text can be specified with a + language string (in addition to its previous boolean + requirement) to treat inline code blocks with no explicit + language specifier with a specific default language. + * NEW: MagicLink: Allow configuring custom + repository providers based off the existing providers. + +------------------------------------------------------------------- +Thu Dec 14 10:45:48 UTC 2023 - Elisei Roca + +- update to 10.5: + * NEW: Blocks: Admonitions and Details now allow configuring + custom block classes and default titles. + * FIX: Keys: Ensure that Keys does not parse base64 encoded URLs. + +- from 10.4: + * NEW: Snippets: Allow PathLike objects for base_path to better + support interactions with MkDocs. + * FIX: Block Admonitions: Empty titles should be respected. + * FIX: Block Details: Empty summary should be respected. + +- from 10.3.1: + * FIX: SuperFences: Fix an issue where braces were not handled + properly in attributes. + +------------------------------------------------------------------- +Thu Sep 7 07:14:27 UTC 2023 - Johannes Kastl + +- update to 10.3: + * NEW: Officially support Python 3.12. + * NEW: Drop Python 3.7 support. + +------------------------------------------------------------------- +Thu Sep 7 07:09:26 UTC 2023 - Johannes Kastl + +- update to 10.2.1 (skipping non-existent 10.2.0 release): + * FIX: Tabbed: Fix regression. + +------------------------------------------------------------------- +Thu Sep 7 07:08:13 UTC 2023 - Johannes Kastl + +- update to 10.1.0: + * NEW: Add new combine_header_slug option in legacy Tabbed + extension and new Block Tab extension that will + prefix a content tab's slug with the parent header's slug. This + allows for content tab slugs that are scoped to the + header they are under. + +------------------------------------------------------------------- +Thu Sep 7 07:07:05 UTC 2023 - Johannes Kastl + +- update to 10.0.1: + * FIX: Regression related to snippets nested deeply under + specified base path. + +------------------------------------------------------------------- +Thu Sep 7 07:05:48 UTC 2023 - Johannes Kastl + +- update to 10.0: + * Break: Snippets: snippets will restrict snippets to ensure they + are under the base_path preventing snippets relative to the + base_path but not explicitly under it. restrict_base_path can + be set to False for legacy behavior. + +------------------------------------------------------------------- +Mon Apr 24 12:19:08 UTC 2023 - Elisei Roca + +- require python-PyYAML from requirements/project.txt +- recommend python-Pygments from requirements/extra.txt + +- update to 9.11: + * NEW: Emoji: Update to new CDN and use Twemoji 14.1.2. + * NEW: Snippets: Ignore nested snippet section syntax when including a section. + +------------------------------------------------------------------- +Fri Mar 17 07:29:00 UTC 2023 - Johannes Kastl + +- update to 9.10: + * NEW: Blocks: Add new experimental general purpose blocks that + provide a framework for creating fenced block containers for + specialized parsing. A number of extensions utilizing general + purpose blocks are included and are meant to be an alternative + to (and maybe one day replace): Admonitions, Details, + Definition Lists, and Tabbed. Also adds a new HTML plugin for + quick wrapping of content with arbitrary HTML elements. + * NEW: Highlight: When enabling line spans and/or line anchors, + if a code block has an ID associated with it, line ids will be + generated using that code ID instead of the code block count. + * NEW: Snippets: Expand section syntax to allow section names + with `-` and `_`. + * NEW: Snippets: When check_paths is enabled, and a specified + section is not found, raise an error. + * NEW: Snippets: Add new experimental feature dedent_sections + that will de-indent (remove any common leading + whitespace from every line in text) from that block of text. + * NEW: MagicLink: Update GitLab links to match recent changes and + to be more correct. + * NEW: MagicLink: Relax required hash length when performing link + shortening. + +- update to 9.9.2: + * FIX: Snippets syntax can break in XML comments as XML comments + do not allow --. Relax Snippets syntax such that + -8<- (single -) are allowed. + +------------------------------------------------------------------- +Thu Jan 19 08:49:26 UTC 2023 - Elisei Roca + +- Initial commit of pymdown-extensions at version 9.9.1 + diff --git a/python-pymdown-extensions.spec b/python-pymdown-extensions.spec new file mode 100644 index 0000000..59b269d --- /dev/null +++ b/python-pymdown-extensions.spec @@ -0,0 +1,73 @@ +# +# spec file for package python-pymdown-extensions +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define skip_python2 1 +%define skip_python36 1 +%{?sle15_python_module_pythons} +Name: python-pymdown-extensions +Version: 10.15 +Release: 0 +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 +BuildRequires: %{python_module Markdown >= 3.6} +BuildRequires: %{python_module base >= 3.8} +BuildRequires: %{python_module hatchling} +BuildRequires: %{python_module pip} +# test requirements +BuildRequires: %{python_module PyYAML >= 3.10} +BuildRequires: %{python_module Pygments >= 2.19.1} +BuildRequires: %{python_module pytest} +# +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-Markdown >= 3.6 +Requires: python-PyYAML >= 3.10 +Recommends: python-Pygments >= 2.19.1 +BuildArch: noarch +%python_subpackages + +%description +PyMdown Extensions is a collection of extensions for Python Markdown. + +They were originally written to make writing documentation more enjoyable. +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 +%autosetup -p1 -n pymdown-extensions-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +find %{buildroot} -type f -name "*.py" -exec chmod a-x {} + +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest + +%files %{python_files} +%doc README.md +%license LICENSE.md +%{python_sitelib}/pymdownx +%{python_sitelib}/pymdown_extensions-%{version}.dist-info + +%changelog