This repository has been archived by the owner. It is now read-only.

An implementation of the {% comment %} tag including a test #32

Closed
wants to merge 4 commits into
base: master
from

Conversation

2 participants
@elliotf
Contributor

elliotf commented Jan 18, 2012

Should address issue #31

Please let me know if you'd like any changes.

@paularmstrong

This comment has been minimized.

Show comment
Hide comment
@paularmstrong

paularmstrong Jan 18, 2012

Owner

You can already use {# comment goes here #}. Why would you need an extra tag for the same thing? Comment docs

Owner

paularmstrong commented Jan 18, 2012

You can already use {# comment goes here #}. Why would you need an extra tag for the same thing? Comment docs

@elliotf

This comment has been minimized.

Show comment
Hide comment
@elliotf

elliotf Jan 18, 2012

Contributor
  1. Because the {# comment #} syntax doesn't allow for multi-line comments
  2. If the {# comment #} syntax was extended to allow for multi-line comments, it breaks django template syntax highlighting.
  3. It's an incredibly simple tag/test.
Contributor

elliotf commented Jan 18, 2012

  1. Because the {# comment #} syntax doesn't allow for multi-line comments
  2. If the {# comment #} syntax was extended to allow for multi-line comments, it breaks django template syntax highlighting.
  3. It's an incredibly simple tag/test.
@paularmstrong

This comment has been minimized.

Show comment
Hide comment
@paularmstrong

paularmstrong Jan 18, 2012

Owner

I appreciate the thought here, but I'm really unconcerned with feature-parity between swig and Django, Jinja, Twig, etc.

The {# ... #} syntax actually removes the content and tags from being stored through the parser, so all compiled (pre-rendered) templates are stored with less information. Using a tag creates a larger memory footprint for templates, which is not optimal.

Since the main feature here is the ability to write multi-line comments, I'm going to call this a duplicate of gh-30.

If you want to continue using your comment tag, check out the documentation for custom tags.

Owner

paularmstrong commented Jan 18, 2012

I appreciate the thought here, but I'm really unconcerned with feature-parity between swig and Django, Jinja, Twig, etc.

The {# ... #} syntax actually removes the content and tags from being stored through the parser, so all compiled (pre-rendered) templates are stored with less information. Using a tag creates a larger memory footprint for templates, which is not optimal.

Since the main feature here is the ability to write multi-line comments, I'm going to call this a duplicate of gh-30.

If you want to continue using your comment tag, check out the documentation for custom tags.

@elliotf

This comment has been minimized.

Show comment
Hide comment
@elliotf

elliotf Jan 18, 2012

Contributor

If it results in multiline comments I'll be content. I understand the desire to not store the commented out text, but it would have been nice to maintain syntax. Thanks!

Contributor

elliotf commented Jan 18, 2012

If it results in multiline comments I'll be content. I understand the desire to not store the commented out text, but it would have been nice to maintain syntax. Thanks!

@paularmstrong

This comment has been minimized.

Show comment
Hide comment
@paularmstrong

paularmstrong Jan 18, 2012

Owner

Yep, you should be able to get the fix for gh-30 that includes multi-line comments in swig@0.9.1 which went up about an hour ago.

Owner

paularmstrong commented Jan 18, 2012

Yep, you should be able to get the fix for gh-30 that includes multi-line comments in swig@0.9.1 which went up about an hour ago.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.