|There's more than one way to do things|
Re^15: Making Perl Monks a better place for newbies (and others)by pryrt (Prior)
|on Feb 05, 2020 at 18:19 UTC||Need Help??|
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.)