http://www.perlmonks.org?node_id=11112586


in reply to Re^12: Making Perl Monks a better place for newbies (and others)
in thread Making Perl Monks a better place for newbies (and others)

I'm not entirely sure what you mean.

So I guess it wasn't clear enough. What I meant was what I said. All those things you're talking about are transparent at the application level. What you type in the box is what the PM engine gets. And it's not unique in this regard; all web apps (except maybe stupid ones which try to meddle in the lower layers) are like this.

We could replace the newlines with <p> tags. But most users don't want this. It would violate the "principle of least surprise". More importantly, given that input can consist of a mixture of html and <pre>-formatted blocks and <code>-formatted blocks (etc.), the problem of determining which newlines to replace and which to leave alone becomes Very Hard Indeed. It's not worth the effort. The result would never be more than 90% right, and that's not good enough. Just suck it up and write your post in html.

I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.

Replies are listed 'Best First'.
Re^14: Making Perl Monks a better place for newbies (and others)
by LanX (Saint) on Feb 07, 2020 at 22:36 UTC
    > More importantly, given that input can consist of a mixture of html and <pre>-formatted blocks and <code>-formatted blocks (etc.), the problem of determining which newlines to replace and which to leave alone becomes Very Hard Indeed.

    Hard but not impossible.

    But thanks for mentioning, I didn't think about also excluding <pre> -blocks in my nodelet hack.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

      Hard but not impossible.

      Plenty hard. 90% isn't nearly good enough.

      I'd be much more interested in trying to support a completely different format — like markdown — than making a tiny tweak to our existing format which will break everybody's brain (certain newbs excepted).

      I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.
        Not my experience, the code is only complicated because of the wiki mark up and link transformations.

        Paragraphs are easy.

        We've created several 1000 posts since 2016 and I know no case of <p> inserted in code blocks.

        But my approach is quite different to Everything's which sometimes creates weird results.

        I'd say mine is some percent better.

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

A reply falls below the community's threshold of quality. You may see it by logging in.