%global pypi_name mistune

Name:           python-mistune
Version:        3.3.2
Release:        2
Summary:        A Python Markdown Parser
License:        BSD-3-Clause
URL:            https://github.com/lepture/mistune
Source0:        %url/archive/v%{version}/%{pypi_name}-%{version}.tar.gz
	
BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:	python3-pbr
BuildRequires:	python3-pip
BuildRequires:  python3-wheel
BuildRequires:  python3-hatchling
BuildRequires:  python3-pytest

%description
The python-mistune package is a fast yet powerful Python Markdown
parser with renderers and plugins, compatible with sane CommonMark
rules.

%package -n python3-mistune
Summary:        A Python Markdown Parser

%description -n python3-mistune
The python-mistune package is a fast yet powerful Python Markdown
parser with renderers and plugins, compatible with sane CommonMark
rules.

%prep
%autosetup -n mistune-%{version} -p1

%build
%pyproject_build

%install
%pyproject_install

%check
%pytest

%files -n python3-mistune
%doc LICENSE README.rst
%{python3_sitelib}/mistune
%{python3_sitelib}/mistune-*.dist-info
%{_bindir}/mistune

%changelog
* Tue Jul 14 2026 Ge Wang <wang__ge@126.com> - 3.3.2-2
- Remove v1 package release

* Wed Jun 24 2026 guochao <guochao@kylinos.cn> - 3.3.2-1
- Update version to 3.3.2
  *fix(image): validate figure width option
  *fix(toc): avoid generated id collisions
  *fix(directive): use correct file path for include directive
  *fix: resolve mypy issues for python 3.8 and 3.9+

* Wed May 06 2026 YangengLiu <dev01202@linx-info.com> - 3.2.1-1
- update version to 3.2.1
  * Resolve Windows compatibility issues in file inclusion and tests.
  * fix: Escape html text.
  * fix: Update link reference.
  * fix: Handle escaped dollar signs in inline math.
  * fix: Escape id of toc.
  * fix: Escape id of headings.
  * Remove double-encoding of image alt text.
  * Escape xml for math plugin.
  * Use strict regex for image's height and width.

* Wed Dec 24 2025 YangengLiu <dev01202@linx-info.com> - 3.2.0-1
- update version to 3.2.0
  * Support footnotes that start on the next line.
  * Properly handle code blocks inside footnotes.
  * Support python 3.14
  * Render ref links and footnotes in footnotes.
  * Render ref links in TOC.
  * Update typing for mypy upgrades.
  * Render correct html for footnotes.

* Tue Sep 30 2025 jinshuaiyu <jinshuaiyu@kylinos.cn> - 3.1.4-1
- Update package with version 3.1.4
- Add fenced directive break rule in list parser
- Prevent remove unicode whitespace when parsing atx heading

* Sun Apr 20 2025 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 3.1.3-1
- Update package with version 3.1.3
  Announce supports for python 3.12 and 3.13
  Add typing-extensions into dependencies
  Add py.typed for mypy
  Add more type hints
  Improve on parsing list. Make it possible to customize list regex

* Fri Nov 10 2023 Dongxing Wang <dxwangk@isoftstone.com> - 2.0.4-2
- Add v1 package release

* Tue Nov 7 2023 Dongxing Wang <dxwangk@isoftstone.com> - 2.0.4-1
- Upgrade package to version 2.0.4

* Thu May 5 2022 caodongxia <caodongxia@h-partners.com> - 0.8.3-9
- Remove dependency on python-nose

* Fri Apr 01 2022 yangping <yangping69@huawei.com> - 0.8.3-8
- Fix build error caused by py3.10+ wildcard

* Thu Jul 22 2021 wangyue <wangyue92@huawei.com> - 0.8.3-7
- Remove python2-mistune subpackage and remove python2 related buildrequire

* Thu Mar 05 2020 Jiangping Hu <hujp1985@foxmail.com> - 0.8.3-6
- Package init