My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 2: Add whitespace options
2 people starred this issue and may be notified of changes. Back to list
 
Project Member Reported by andyc...@gmail.com, Mar 8, 2009
- For compressing all whitespace
- For preserving indentation
- default: do nothing

Apr 9, 2009
Project Member #1 gtempacc...@yahoo.com
Proposed behavior:

whitespace-mode: any 

  The template author does not care, this is for backward compatibility with the
existing somewhat arbitrary behavior.  The existing tests may be relaxed to do
ignore_whitespace=True

whitespace-mode: strip

  remove whitespace around *directives* (for network efficiency, yes it matters)

whitespace-mode: preserve

  Do *exactly* what the template says.  (The current behavior is *almost exactly*)

whitespace-mode: smart-indent

  Well indented templates should produce well-indented outputs.  Useful for
generating both HTML/XML and source code.


Apr 16, 2009
Project Member #2 gtempacc...@yahoo.com
The "smart indent" style was done for the Python version.  I have written some notes
on the Reference wiki page that makes it clear that it's optional.

For the JavaScript version, I want to keep the code size small, and this "smartness"
does add a bit of code size.  So we could leave it, or find a more compact way to
implement it -- maybe with a tokenizing regex that does something like (block
directive)|(substitution) to distinguish the 2 cases.



Apr 17, 2009
Project Member #3 gtempacc...@yahoo.com
(No comment was entered for this change.)
Status: Started

Powered by Google Project Hosting