Skip to content

Docs update re triple quotes and block assignments #1825

@nixjdm

Description

@nixjdm

I think the docs could use a small update to this section https://jinja.palletsprojects.com/en/3.1.x/templates/#block-assignments to mention "triple quotes", to say that they are not supported, and that set / endset is the right method for multline strings and strings that mix single and double quotes that you don't want to escape.

I've seen people wonder how to do that multiple times, and they assume triple quotes work, and don't find it in the docs with a crtl-f. Literally adding the phrase

"triple quotes (''' and """)"

to that section seems like it would help people discover the right way to do this a lot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions