askama icon indicating copy to clipboard operation
askama copied to clipboard

Allow output of not prettified JSON data

Open FalkWoldmann opened this issue 1 year ago • 0 comments

Hi,

right know, |tojson will always prettify the output. This can lead to noisy output, e. g. when constructing a stringified object for a data- attribute. I think it would be a nice addition to toggle this functionality, perhaps with a new filter or with a parameter on the existing filter if that it possible?

This idea was already brought up in #192 and #1008.

What do you think?

FalkWoldmann avatar Apr 25 '24 14:04 FalkWoldmann