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

Update replace.rst #3733

Closed
wants to merge 1 commit into from
Closed

Update replace.rst #3733

wants to merge 1 commit into from

Conversation

ankitamin
Copy link

foo should be "foo"

foo should be "foo"
@@ -13,7 +13,7 @@ The ``replace`` filter formats a given string by replacing the placeholders

{# using % as a delimiter is purely conventional and optional #}

{{ "I like this and --that--."|replace({'this': foo, '--that--': "bar"}) }}
{{ "I like this and --that--."|replace({'this': "foo", '--that--': "bar"}) }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

foo is not quoted intentionally to show how to embed a variable.

@fabpot
Copy link
Contributor

fabpot commented Aug 14, 2022

See #3734 where I try to clarify the docs.

@fabpot fabpot closed this Aug 14, 2022
fabpot added a commit that referenced this pull request Aug 14, 2022
This PR was merged into the 2.x branch.

Discussion
----------

Make doc clearer for the replace filter

Closes #3733

Commits
-------

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

Successfully merging this pull request may close these issues.

None yet

3 participants