Metadata-Version: 2.1
Name: jinja-markdown2
Version: 0.3.0
Summary: A Jinja2 extension for rendering Markdown with markdown2.
Home-page: https://github.com/mkbabb/jinja-markdown2
License: MIT
Keywords: jinja2,markdown2
Author: Mike Babb
Author-email: mike7400@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: jinja2 (>=3.1.2,<4.0.0)
Requires-Dist: markdown2 (>=2.4.8,<3.0.0)
Project-URL: Repository, https://github.com/mkbabb/jinja-markdown2
Description-Content-Type: text/markdown

# jinja-markdown2

Inspired by the original [jinja-markdown](https://github.com/jpsca/jinja-markdown).

Uses `jinja2` + `markdown2` to render markdown code _after_ jinja's templating magic
(variable interpolation, etc.) is done. Critical difference between the naive:

    Markdown ->  HTML -> Jinja

Notice, the above processes the markdown _first_ and jinja templating _last_. Whilst
this approach technically works, it results in a myriad of problems with the resultant
HTML that markdown2 formulates.

The flow is then:

    HTML -> Jinja -> Markdown

## Usage

Python:

```python
...
from jinja_markdown2 import MarkdownExtension

jinja_env = ...
jinja_env.add_extension(MarkdownExtension)
...
```

Markdown:

```html
{% markdown %}

## Hello {{ world_name }}

{% endmarkdown %}
```

