I've currently returned to doing a little work on PMEdit (see PerlMonks Editor). After mostly fixing a nasty rendering problem I find I need to know which PM specific markup is block level, which is not and which is both.

For example, c or code is both. readmore is block level only. spoiler I presume is not block level.

Can someone confirm that I have that much right, or at least point me at the code where such things are handled?

What other PM/everything specific markup need I be aware of? (I've checked Perl Monks Approved HTML tags btw.)

Update: Should PMEdit render nested elements correctly? For example:

<i><p>italic <b>bold italic</i> bold</p> <p>still bold.</b> normal</p>

renders as:

italic bold italic bold

still bold. normal

which, although expected, is rather frowned on. Would it be appropriate for PMEdit to coerce that to:

<p><i>italic <b>bold italic</b></i><b> bold</b></p> <p><b>still bold.</b> normal</p>

which renders as:

italic bold italic bold

still bold. normal

Update: Should formating be supported across code blocks. For example:

<i><code> code block italicised </code></i>

Renders as:

code block italicised

DWIM is Perl's answer to Gödel

Replies are listed 'Best First'.
Re: Ideas for PerlMonks Markup support in an editor
by ikegami (Patriarch) on Aug 06, 2006 at 05:22 UTC

    Should formating be supported across code blocks.

    Yes, at least in the case of <strike>.

    spoiler I presume is not block level.

    It is block level both when hidden

    pre <div class="spoil_link"> &lt;<a href="?showspoiler=565836-1;node_id=565836">Reveal this spoiler +</a> or all <a href="?node_id=565836;spoil=1">in this thread</a><!-- spoiler text -->&gt; </div> post

    ...and when revealed.

    pre <div class="spoiled"> spoiler text </div> post
Re: Ideas for PerlMonks Markup support in an editor
by Tanktalus (Canon) on Aug 06, 2006 at 13:43 UTC

    Which browser are you implementing? ;-) On firefox, that first one doesn't do what it says it does. It actually renders as:

    italic bold italic

    bold

    still bold. normal

    Firefox seems to enforce nesting. Which, as I recall (perhaps incorrectly), is the way that the HTML standards have always described things. Not closing tags in reverse order of them being opened cause "undefined behaviour," which, as most computer programming geeks should know, means that it could format your hard disk. Sounds like your browser has chosen to implement the undefined behaviour as "continue the text formatting" while Firefox has chosen to implement it as "automatically close off tags that should have been closed." Neither one is wrong as per my recollection of the standard.

      Interesting. I'm using Firefox - currently 1.5.0.6 and it behaves as I described and expected.

      Subsequent to posting it occured to me I could test things such as spoiler tags in my private pad where I independently discovered the results ikegami provided (thought I'd leave my comment stand for others to have the pleasure of correcting though :).

      I'm strongly inclined to follow ikegami and ww's suggestion that formating be allowed across PM special block markup (code, readmore and spoiler tags), and that it should otherwise be coerced to correctly nested elements without non-block level elements spanning block level elements.


      DWIM is Perl's answer to Gödel
      Firefox seems to enforce nesting.

      PerlMonks can enforce nesting and Tanktalus currently has PerlMonks configured to do that for him. So it is likely PerlMonks and not FireFox that is doing this enforcement, given how others are not seeing FireFox act as claimed.

      - tye        

Re: Ideas for PerlMonks Markup support in an editor
by ww (Archbishop) on Aug 06, 2006 at 16:09 UTC
    While conceeding that to some this is only a matter of taste, I would generally argue for holding to html 4.01-style standards in the matter of nesting.

    Therefore, coercing proper nexting seems an appropriate behavior. Moreover, it would spare the reader the grayed-out </b> reminders/error/warnings exhibited when the user has troubled to turn on the Monastery's checking HTML Related Options.

    OTOH, formatting across code blocks (such as you showed, anyway) seems a reasonable departure from what I understand to be the standard and thus likewise seems to me appropriate here.