Re: compress vs. pre/code
Friday, January 26, 2018, 4:37:57 PM, Riehemann, Michael wrote: > Hi Freemarker Devs, > > I'm not sure if this is a bug or feature request about the compress directive. > > Example: > > <#compress> > > > > #maybe a code example > With 4 whitespaces in every line > > > > > Problem: > The whitespace in the Tag is removed and will change the > layout of it. Same for . This is bad for code examples and > breaks the concept of and . Since we always use > <#compress> in our outer template, you never have a change to avoid it. > > Ideas: > 1. Fix it as a bug and skip and in compress. > 2. Add a new feature like <#nocompress/> > > What do you think? FreeMarker doesn't try to interpret the static content. It doesn't know what HTML is. It's just not that kind of template engine. So that leaves us with idea 2. But, I think a 3rd one would be the best. As #compress is just Writer filter basically (it doesn't remove whitespace during the parsing phase), you just need a more intelligent, HTML-aware FilterWriter. Especially as you do this for all templates, can't you just pass a such Writer to Template.process? Then the templates aren't polluted with that boilerplate. (If some templates doesn't need it, something like <#ftl attributes = { 'compress': false }> could be used.) > -Michael Riehemann -- Thanks, Daniel Dekany
[RESULT][VOTE] Graduate Apache FreeMarker Project from Incubator to TLP
Vote on the podling mailing list on the Apache FreeMarker Project Resolution (graduate FreeMarker to TLP) passed with the following results: 4 "+1" votes from IPMC members (also 3 "+1" from other PPMC members, and 2 "+1" from non-members), no "0" votes, no "-1" votes. Thus, a similar graduation vote will be soon follow (within days hopefully) on gene...@incubator.apache.org. The votes were: Jacopo Cappellato +1 (binding) Jacques Le Roux +1 (binding) Ralph Goers +1 (binding) Sergio Fernández +1 (binding) Dániel Dékány +1 non-binding PPMC David E Jones +1 non-binding PPMC Woonsan Ko +1 non-binding PPMC Barrie Selack +1 non-binding non-PPMC Piyush Mor +1 non-binding non-PPMC Thank you for your participation! The initial vote mail that contains the Resolution: https://lists.apache.org/thread.html/e85c72b2a7644005ff44d144e08807362e0461a5f854a1f691a960db@%3Cdev.freemarker.apache.org%3E Vote mails: https://lists.apache.org/thread.html/4021085e88c35ea254e4a15e7320f1bf3d09a5562913edbd7c00d0c6@%3Cdev.freemarker.apache.org%3E https://lists.apache.org/thread.html/07d6cff8f5616459d41bf8a6c77c17332c6783b137e1b23132bcb6f3@%3Cdev.freemarker.apache.org%3E https://lists.apache.org/thread.html/d2852a2cad7b1e46e50cd0ee3770209acfbce761799378a822c23bb3@%3Cdev.freemarker.apache.org%3E https://lists.apache.org/thread.html/d7c03d0cce4741f502f06ed591b9f9a1180cf79d5473e200d7ee8d6a@%3Cdev.freemarker.apache.org%3E https://lists.apache.org/thread.html/e9da0c97bed4ea27f17aae46f983828079574a9b6dc517d4080010ea@%3Cdev.freemarker.apache.org%3E https://lists.apache.org/thread.html/8af3367437eda9fb5839a02b7a7746146ad8df23847c807a1e34f6bf@%3Cdev.freemarker.apache.org%3E https://lists.apache.org/thread.html/9709c8d5fc7feb953503d201f3cb0a94eb6140cfc707fe71596102f3@%3Cdev.freemarker.apache.org%3E https://lists.apache.org/thread.html/2d91983f12c38fb4b3eb3f973c9d800142ea50627515bb871a5dfe1c@%3Cdev.freemarker.apache.org%3E https://lists.apache.org/thread.html/3dfbe985c1a68e7fcfe77d34385e3bf5ef0766b4239d0a22bf528810@%3Cdev.freemarker.apache.org%3E -- Thanks, Daniel Dekany