[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mason
Subject:    Re: [Mason] Suggestion on newlines; related to 406
From:       "P. Fleury" <fleury () users ! sourceforge ! net>
Date:       2003-05-08 0:43:32
[Download RAW message or body]

Alex Robinson wrote:

>>How do you handle new lines inside of <pre> tags?
>>    
>>
>
>And tabs? And extra spaces?
>
>Personally, I do that stuff in my topmost autohandler. Before I do any
>other munging I remove all pre tags and their contents (and textarea ones
>too because much the same formating preservation issues apply) and store
>them in an array, leaving placeholder text in its stead. I then do any
>filtering I want on the rest of the output and finally reinsert the stored
>values.
>
>However, I really don't see that Mason should have any built-in
>capabilities to do such things even if there are speed benefits to be had.
>Would there be differing levels of stripping (single line breaks and tabs
>allowed/no whitespace at all etc)? Would it also know about different file
>types and alter its behaviour accordingly?
>
>Or am I just being curmudgeonly?
>
>  
>

I think the same way. Even though Mason is used mostly for HTML, some 
use it for XML or CSS output, and it can be used for many other things 
(on-the-fly PDF, PNG, Excel files, formatted ASCII, etc.), in which case 
the formatting issues are different. Such a "white space compressor" is 
a matter of an autohandler <%filter%>, a <&| component call &> with 
content</&> or a sub-class in the ApacheWithSession style.

--Pascal



-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com

_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic