
greg at node79
Aug 26, 2011, 6:50 AM
Post #2 of 3
(347 views)
Permalink
|
Hi Zdravko, You could use a Mason <%filter> block. Inside that block, $_ will be the current output so you can just edit it in-place. You could put this right on the autohandler or inside a template depending on your setup (I do this on element templates to convert them from Markdown myself). I'm sure there's a CPAN module to do the indenting. If it works on fragments of HTML as well as on entire HTML documents, so much the better. HTH, --Greg Example template: <html> ... lots of html ... </html> <%filter> $_ = CPAN::Module::to_indent_html($_); </%filter> On 2011-08-26, at 7:35 AM, Zdravko Balorda wrote: > Hi, > this is silly question: can Mason help indenting output html so > that page source at the end looks nicer? :) > > Please, apologize, regards, Zdravko
|