[pmwiki-users] RFC: Eliminating <p class='vspace'></p>

Patrick R. Michaud pmichaud at pobox.com
Sun Apr 2 19:23:21 CDT 2006


On Mon, Apr 03, 2006 at 11:44:47AM +1200, John Rankin wrote:
> On Saturday, 1 April 2006 9:19 PM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> >  - Bare text not associated with block level markup that does *not*
> >    follow a blank line becomes a simple <p>...text...</p>.  
> >    (Perhaps we'll put a class= designator on this as well -- I 
> >    just can't come up with a good name at the moment.)
> 
> So the first paragraph on a page is a bare <p>?

Unless it comes after a blank line, yes.

> >  - Other blank lines in the markup (e.g., in lists) produce 
> >    <div class='vspace'><div> to generate vertical whitespace 
> >    (controlled by the $HTMLVSpace variable).  
> 
> What is the reason for not continuing to use <p class='vspace'></p>
> in this case?

Going back to my original message:

    After 2+ years of making essentially the same arguments 
    over and over again about the <p class='vspace'></p> tags in 
    output (and coming to the same conclusions each time), I find 
    I'm weary of the ongoing struggle and just want it to go away.

I'm basically tired of people telling me how <p class='vspace'></p>
doesn't follow the HTML standards (and that HTML shouldn't have
empty paragraphs).  Changing it to <div class='vspace'></div>
overcomes this objection.  Some may still complain about the
use of an empty div for this purpose, but they can no longer point 
to the section 9.3.1 of the HTML spec as "proof" that PmWiki is 
doing things wrong.

> >Some likely consequences of this proposal:
> >
> >1.  Because "paragraph text" will be producing either <p> 
> >    or <p class='vspace'>, the wikistyles.php code will have to be
> >    substantially modified in order to properly apply styles to
> >    paragraphs containing a class= attribute.  (Is this okay,
> >    John?  I'll be glad to help with any side effects to
> >    wikipublisher.php.)
> 
> This is going to cause all sorts of interesting issues. At the
> moment, we set $HTMLVSpace = '<vspace/>'; and then replace this
> in post-processing with appropriate skip attribute values in
> the tags that come after. This will break under the proposed
> scheme. 

It wouldn't have to.  The code to generate a "paragraph after
a blank line" will be customizable, and default to "<p class='vspace'>".
Changing this default setting to  "<vspace/><p>" would seem to
produce the equivalent of what you're doing now.

> At the moment, I cannot see how we will be able to achieve what
> we do now with the proposed approach, without a lot of work. Sigh.
> For us, getting the spacing right is literally 2 lines of code.

Yes, I know, this is also partially why PmWiki does things the
way it does now.  But I am quite serious when I say that many people
see this aspect of PmWiki and think it is somehow "broken", and I'd
like to eliminate it.

> While I can see the theoretical justification, if it's a 
> substantial change, I can't see that the benefit warrants the
> effort. I *think* the same effect could be achieved by introducing 
> a $HTMLPSpace variable that is only used before a <p> tag, with
> a default value of $HTMLVSpace. Those who wish to can set it to
> '' and still achieve the effects they desire.

The ability to change things via $HTMLVSpace is already true to
some extent.  Simply introducing a(nother) way to customize
PmWiki to eliminate <p class='vspace'><p> without changing the
default doesn't really address the original reason for this
particular proposal -- namely, the (apparently not uncommon)
perception that the HTML PmWiki produces isn't really valid
or consistent with the design of HTML.

Pm




More information about the pmwiki-users mailing list