Changes between Version 17 and Version 18 of ContributedMiddleware


Ignore:
Timestamp:
08/01/2006 11:52:39 PM (9 years ago)
Author:
anonymous
Comment:

indention-saving regex for StripWhitespaceMiddleware

Legend:

Unmodified
Added
Removed
Modified
  • ContributedMiddleware

    v17 v18  
    4242=== [http://code.djangoproject.com/attachment/wiki/ContributedMiddleware/StripWhitespaceMiddleware.py Strip Whitespace Middleware] by Doug Van Horn ===
    4343
    44 Removes extra whitespace from response content.  It's kind of nice for removing extra line breaks, but it also removes leading spaces.  Probably not too important for most of us, but for the bandwidth conscious it might be helpful.
     44Removes extra whitespace from response content.  It's kind of nice for removing extra line breaks, but it also removes leading spaces.  Probably not too important for most of us, but for the bandwidth conscious it might be helpful.  If you would like to keep your indentions intact, then use `'\s*\n+'` as the regular expression string instead of `'\s*\n+\s*'`.
Back to Top