Since both the "page too wide" (Perl Monks) FAQ and the incident it refers to tend to come out quite so often, but it's also true at the same time that there are (rarer) cases in which <pre> tags are useful (I stumbled into one such case a few days ago), I wonder whether it would be possible to implement a visually distinctive warning signaling <pre> tags (and other potentially "risky" stuff like long unbreakable lines which should be easy enough to detect) to the effect of something along the lines of:

You used <pre> tags: they can cause some inconveniences as detailed in this FAQ, do you really need them? If so, then check you don't have excessively long lines. If not, please consider using <code> tags instead.

These warnings of course should pop up after hitting the preview button, but then I think it would be sensible to have them pop up and act like in preview mode even if the author enabled the "no forced preview" setting in their user settings. Indeed knowledgeable users will... know in advance and probably only seldom meet the warning, and if and when they do, it won't be a major hassle to them to press an additional button.


In reply to How 'bout a <pre> (and other stuff) warning? by blazar

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.