djc / askama

Type-safe, compiled Jinja-like templates for Rust
Apache License 2.0
3.35k stars 215 forks source link

Remove `yaml` and `markdown` filters and remove `comrak` dependency #1003

Closed GuillaumeGomez closed 5 months ago

GuillaumeGomez commented 5 months ago

Fixes #1002.

GuillaumeGomez commented 5 months ago

So do we think the Markdown filter does get to stay? Why?

I was wondering about the same thing. Should I remove it too?

GuillaumeGomez commented 5 months ago

And what about json btw?

djc commented 5 months ago

JSON feels like it's like to be an order of magnitude more popular, so I'm on board with it staying. Maybe we could do some code search to see what features people enable in the wild...

Kijewski commented 5 months ago

So do we think the Markdown filter does get to stay? Why?

Yeah, I guess running the input through comrak manually is easy enough. There seem to be users of the feature (#656, #719, #993), but I guess that's not enough to keep this feature around, esp. since comrak is (still) fast moving.

GuillaumeGomez commented 5 months ago

Ok, let's remove markdown as well then. We can check for json later on.

Kijewski commented 5 months ago

A json filter is essential, IMHO. Any Javascript interaction or <a data-abc="…"> uses this feature. Or, at least I use this filter for these use cases.

GuillaumeGomez commented 5 months ago

Removed the markdown filter as well, which allowed to remove the comrak dependency (yeay).

GuillaumeGomez commented 5 months ago

Let's go!

blakehawkins commented 1 month ago

Heads up, this created a bit of a headache for me @GuillaumeGomez @djc @Kijewski

I have been using the askama-filters package to pull in the markdown filter for some time

When I updated to the latest version of askama, my builds began failing with a cryptic "opt-in to the markdown feature". I managed to figure out that askama has a markdown feature and filter built-in on the latest release, but only after scratching my head over the fact that it's absent from both the docs and the codebase

I eventually realised that the latest askama release is quite different from the HEAD of the repo. I tried massaging askama-filters to work with it but ultimately it's ~abandoned and the author doesn't use github.

I created https://crates.io/crates/askama-markdown-cmark - hopefully not in vain

Cheers to a more stable future for askama?

djc commented 1 month ago

Glad you managed to resolve the issue! Yes, I think things will improve from here.