I know for a fact that these newline characters ... are being stripped.

No you don't. You just don't understand HTML.

This paragraph has ten newlines between the parentheses: ( ). But it doesn't render that way. It looks like a single space between the parentheses, like ( ).

HTML is newline agnostic -- or rather, it collapses 1 or more newlines into a single space when rendered. It's not perlmonks that strips the newlines; it's the rendering engine of your browser, in accordance with HTML specifications. If you disbelieve me, view source on my reply, which shows the newlines still exist in the raw HTML. (edit: Perlmonks doesn't strip them out; it send them to your browser, and your browser's rendering engine does the whitespace collapsing./edit) The same works on every HTML page on the internet; it's something I've known since I started hand-coding HTML in college in 1993. It's not something new.

PerlMonks is not content with p but also requires slash p surrounding each paragraph. This all becomes rediculous when posting from a mobile device, where these characters are unavailable. ... Sometimes I miss one or the other p and the whole post has to be fixed in preview. The implementation does not seem consistent, so I use br.

Yes, the HTML spec requires both opening and closing tags for the paragraph, as in <p>...</p>. And the perlmonks preview highlights when you miss one of them. But if you create the post with the missing </p> anyway, it will still render reasonably. For example, I will intentionally forget the closing p in this paragraph...

This paragraph starts with a new <p>, even though the previous paragraph didn't properly close with </p>. And it still renders. Perlmonks was just doing you the favor of showing your malformed HTML before you post; it's up to you whether to listen or not.

I agree that it would be nice if Perlmonks didn't require entry in HTML. (I tried the wikisyntax thingy some time ago, but I am a lot more used to markdown than wiki nowadays, and I'd really prefer if the input engine were Markdown-that-accepts-raw-html-when-I-want-control; but I don't have the skillset to make either a free nodelet hack, or join pmdev and dig into the source code and implement it, so I choose not to complain -- in open source, if I'm not willing or able to do it myself, I don't feel justified in complaining loudly.)


In reply to Re^15: Making Perl Monks a better place for newbies (and others) by pryrt
in thread Making Perl Monks a better place for newbies (and others) by ELISHEVA

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.