Re: [Cppcms-users] No "\n" on compiled templates
Brought to you by:
artyom-beilis
From: Artyom B. <art...@ya...> - 2012-11-09 15:15:13
|
I thought about adding some kind of special switch like <% autotrim (on|off|empty|nl) %> Where on - trims all wite space from the text spegments off - uses as today empty - remove blocks that consist of WS only nl - trim up to first new line including for stuff like <% template render() %> <!DOCTYPE html> to remove leading white space and new line. Volunteers to implement? Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Lee Elenbaas <lee...@gm...> >To: cpp...@li... >Sent: Thursday, November 8, 2012 11:33 PM >Subject: Re: [Cppcms-users] No "\n" on compiled templates > > >I wonder why you would want something like this, and the only option i have in mind is to have the app deliver a "minified" html output to the clients. >sadly introducing something like this into the template mechanism can break the ability to render different content types using the same mechanism (consider an app that render html responses, but also uses the same template mechanism to generate text only emails (where \n are important) > > >i think that the correct way to do it is to provide some way to install a filter on the output stream - so it will skip over the characters that can be minified > > > >On Thu, Nov 8, 2012 at 2:46 PM, Daniel Rios <dan...@li...> wrote: > >Hello there ! There's a way to compile a template using without the "\n" character? >> >>Thanks ! >> >>Daniel >> >>------------------------------------------------------------------------------ >>Everyone hates slow websites. So do we. >>Make your web apps faster with AppDynamics >>Download AppDynamics Lite for free today: >>http://p.sf.net/sfu/appdyn_d2d_nov >>_______________________________________________ >>Cppcms-users mailing list >>Cpp...@li... >>https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> > > > >-- >-- >lee >Lee Elenbaas >lee...@gm... > > >------------------------------------------------------------------------------ >Everyone hates slow websites. So do we. >Make your web apps faster with AppDynamics >Download AppDynamics Lite for free today: >http://p.sf.net/sfu/appdyn_d2d_nov >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |