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

renamed the raw tag to verbatim to avoid confusion with the raw filter #947

Merged
merged 1 commit into from Jan 5, 2013

Conversation

fabpot
Copy link
Contributor

@fabpot fabpot commented Jan 5, 2013

In Twig, we have a raw tag and a raw filter. Unfortunately, they are totally unrelated and that is confusing.

I propose to rename the raw tag to verbatim. Of course, for BC reasons, the old raw tag will be kept around for the foreseeable future as an alias to verbatim.

For the record, raw is used by Jinja (http://jinja.pocoo.org/docs/templates/#escaping), whereas verbatim was introduced in Django in 1.5 (https://docs.djangoproject.com/en/dev/releases/1.5/#verbatim-template-tag).

fabpot added a commit that referenced this pull request Jan 5, 2013
This PR was merged into the master branch.

Commits
-------

cd4ab0f renamed the raw tag to verbatim to avoid confusion with the raw filter

Discussion
----------

renamed the raw tag to verbatim to avoid confusion with the raw filter

In Twig, we have a `raw` tag and a raw filter. Unfortunately, they are totally unrelated and that is confusing.

I propose to rename the `raw` tag to `verbatim`. Of course, for BC reasons, the old `raw` tag will be kept around for the foreseeable future as an alias to `verbatim`.

For the record, `raw` is used by Jinja (http://jinja.pocoo.org/docs/templates/#escaping), whereas `verbatim` was introduced in Django in 1.5 (https://docs.djangoproject.com/en/dev/releases/1.5/#verbatim-template-tag).
@fabpot fabpot merged commit cd4ab0f into master Jan 5, 2013
@stof
Copy link
Member

stof commented Jan 5, 2013

wouldn't your regex allow to write this ?

{% raw %}
Some {{ content }}
{% endverbatim %}

It would look weird to me. IMO, the endtag should be required to match the opening one

@Yahasana
Copy link

Yahasana commented Jan 6, 2013

how about {% literal %}

@trolek
Copy link

trolek commented Jan 6, 2013

Maybe some poll on the tag name?

@fabpot
Copy link
Contributor Author

fabpot commented Jan 8, 2013

@stof: good catch, fixed in 56bef3f

The raw name comes from Jinja and verbatim from Django. Whenever possible, we try to stick with the names and behaviors of these two template engines.

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

4 participants