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

John Rankin john.rankin at affinity.co.nz
Sun Apr 2 19:57:11 CDT 2006


On Monday, 3 April 2006 12:23 PM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>> >  - 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.

Fair enough -- anything for a quiet life :-)
>
>> >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.

Cool!
>
>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.
>
I was hoping to make your life easier and create less work.

If changing $HTMLVSpace from p to div makes people happy,
I'm all for it. Thinking about it some more, people can
control spacing between paragraphs *and* retain
list spacing with a markup rule that looks for
<div class='vspace></div><p and replaces it with
something else. In other words, they don't have to set
$HTMLVSpace to '' if they need it in other situations.

So at the moment, I think all we need to do is change the
definition of $HTMLVSpace. Or am I missing something here?


-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list