Do your really, truly have a compelling and significant reason to worry about the indenting of content in the "body" portion of the page that comes from your database? Client browsers are not going to care about indentation -- they ignore it -- and the web server certainly won't care about indentation.

In the world I'm familiar with, the only humans who worry about indenting of html content are the hapless (or hopelessly compulsive) programmers who must sometimes wade through the html content to locate and understand the points where their html generation processes are going wrong. That's sort of an "ad hoc" need for indentation -- if the html is being created correctly, humans don't have to read it, and indentation is irrelevant.

(If humans need to edit HTML data manually, then indentation is a Good Thing, but the whole point of using a database and a template system is to make manual editing completely unnecessary.)

So please explain why indentation is so important. We often get questions that demonstrate the so-called "XY Problem", but I wonder if this might be a case of an "imaginary problem"...


In reply to Re: Misformatted HTML::Template source code by graff
in thread Misformatted HTML::Template source code by Lawliet

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.