I've currently returned to doing a little work on PMEdit (see [id://543242]). 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 [id://29281] btw.)
Update: Should PMEdit render nested elements correctly? For example:
italic bold italic bold
still bold. normal
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:
italic bold italic bold
still bold. normal
which renders as:
italic bold italic bold
still bold. normal
Update: Should formating be supported across code blocks. For example:
code block italicised
Renders as:
code block italicised
Should formating be supported across code blocks.
Yes, at least in the case of .
spoiler I presume is not block level.
It is block level both when hidden
pre<Reveal this spoiler or all in this thread>post
...and when revealed.
prespoiler textpost
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.
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.
perlmonks.org content © perlmonks.org and GrandFather, ikegami, Tanktalus, tye, ww
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03