Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

please add a markdown filter for jinja2 templates #7

Closed
DonKult opened this issue Oct 31, 2016 · 3 comments
Closed

please add a markdown filter for jinja2 templates #7

DonKult opened this issue Oct 31, 2016 · 3 comments

Comments

@DonKult
Copy link
Contributor

DonKult commented Oct 31, 2016

Hi (again),

"third time's the charm", so instead of bugs I will ask for a feature this time: I think it would be handy if you could have

{% filter markdown %}
*This* is an [example](http://example.org)
{% endfilter %}

in a jinja2 template as that makes it e.g. a lot easier to convert an md page to a j2 page (or back) later on.

It shouldn't be too hard™, a proof-of-concept from a complete python-newbie: DonKult@fcbcbaa

@spanezz spanezz closed this as completed in 72114d6 Nov 1, 2016
@spanezz
Copy link
Owner

spanezz commented Nov 1, 2016

Your proof of concept implementation looks good, I simplified it slightly by exporting the markdown renderer from Site, and I added a test case for it.
Does it work for you?

@DonKult
Copy link
Contributor Author

DonKult commented Nov 2, 2016

(All three:) Works fine for me in a quick test – thanks a lot for the quick responses!

Nitpick: No documentation, you might want to mention the markdown filter in doc/templates.md.

@spanezz
Copy link
Owner

spanezz commented Nov 2, 2016

Good point: added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants