%global _empty_manifest_terminate_build 0 Name: python-jinja-markdown Version: 1.210911 Release: 1 Summary: A jinja2 markdown tag powered with PyMdown Extensions. License: MIT URL: https://github.com/jpsca/jinja-markdown Source0: https://mirrors.aliyun.com/pypi/web/packages/a9/0a/04036727c369c5013f6780ef8c9207b064ee2f183384893ad54ce93ab27c/jinja_markdown-1.210911.tar.gz BuildArch: noarch Requires: python3-Jinja2 Requires: python3-Pygments Requires: python3-pymdown-extensions Requires: python3-pre-commit Requires: python3-tox Requires: python3-pytest Requires: python3-flake8 Requires: python3-flake8-bugbear Requires: python3-flake8-import-order Requires: python3-flake8-logging-format Requires: python3-flake8-quotes %description # Jinja-Markdown [![Tests](https://travis-ci.org/jpsca/jinja_markdown.svg)](https://travis-ci.org/jpsca/jinja_markdown/) A jinja2 extension that adds a `{% markdown %}` tag powered with [PyMdown Extensions](https://facelessuser.github.io/pymdown-extensions/). ## Installation ``` pip install jinja_markdown ``` ## Usage ```python jinja_env = Environment(extensions=['jinja_markdown.MarkdownExtension']) ``` or ```python from jinja_markdown import MarkdownExtension jinja_env.add_extension(MarkdownExtension) ``` Then your templates can contain Markdown inside `{% markdown %}` / `{% endmarkdown %}` block tags. ```html+jinja
{% markdown %} # Heading Regular text print("Hello world!") {% endmarkdown %}
``` ## About indentation To avoid issues is recommended that you don't indent the markdown code inside the tag. If you prefer do it anyway, make sure the first line has the baseline indentation level. ```html+jinja
{% markdown %} # Baseline of identation Regular paragraph This will be interpreted as code
``` %package -n python3-jinja-markdown Summary: A jinja2 markdown tag powered with PyMdown Extensions. Provides: python-jinja-markdown BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-jinja-markdown # Jinja-Markdown [![Tests](https://travis-ci.org/jpsca/jinja_markdown.svg)](https://travis-ci.org/jpsca/jinja_markdown/) A jinja2 extension that adds a `{% markdown %}` tag powered with [PyMdown Extensions](https://facelessuser.github.io/pymdown-extensions/). ## Installation ``` pip install jinja_markdown ``` ## Usage ```python jinja_env = Environment(extensions=['jinja_markdown.MarkdownExtension']) ``` or ```python from jinja_markdown import MarkdownExtension jinja_env.add_extension(MarkdownExtension) ``` Then your templates can contain Markdown inside `{% markdown %}` / `{% endmarkdown %}` block tags. ```html+jinja
{% markdown %} # Heading Regular text print("Hello world!") {% endmarkdown %}
``` ## About indentation To avoid issues is recommended that you don't indent the markdown code inside the tag. If you prefer do it anyway, make sure the first line has the baseline indentation level. ```html+jinja
{% markdown %} # Baseline of identation Regular paragraph This will be interpreted as code
``` %package help Summary: Development documents and examples for jinja-markdown Provides: python3-jinja-markdown-doc %description help # Jinja-Markdown [![Tests](https://travis-ci.org/jpsca/jinja_markdown.svg)](https://travis-ci.org/jpsca/jinja_markdown/) A jinja2 extension that adds a `{% markdown %}` tag powered with [PyMdown Extensions](https://facelessuser.github.io/pymdown-extensions/). ## Installation ``` pip install jinja_markdown ``` ## Usage ```python jinja_env = Environment(extensions=['jinja_markdown.MarkdownExtension']) ``` or ```python from jinja_markdown import MarkdownExtension jinja_env.add_extension(MarkdownExtension) ``` Then your templates can contain Markdown inside `{% markdown %}` / `{% endmarkdown %}` block tags. ```html+jinja
{% markdown %} # Heading Regular text print("Hello world!") {% endmarkdown %}
``` ## About indentation To avoid issues is recommended that you don't indent the markdown code inside the tag. If you prefer do it anyway, make sure the first line has the baseline indentation level. ```html+jinja
{% markdown %} # Baseline of identation Regular paragraph This will be interpreted as code
``` %prep %autosetup -n jinja_markdown-1.210911 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-jinja-markdown -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Thu Jun 08 2023 Python_Bot - 1.210911-1 - Package Spec generated