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

John Rankin john.rankin at affinity.co.nz
Sun Apr 2 18:44:47 CDT 2006


On Saturday, 1 April 2006 9:19 PM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>Here's the proposal I'm currently playing with:
>
>  - There will no longer be any <p class='vspace'></p> in the
>output.
>
>  - "Bare" text that follows a blank line and is not associated with
>    any block-level markup becomes <p
>class='vspace'>...text...</p>.
>
>  - 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>?
>
>  - 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?
>
>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. In general, tags are /much/ easier for wikipublisher to
handle than styles.

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.
>
<snip>
>
>4.  This proposal does not necessarily invalidate the earlier
>    proposal for an explicit paragraph markup -- my comments regarding
>    the potential usefulness of starting a new paragraph without 
>    requiring a blank space still apply.

and could be done as a cookbook recipe in the first instance...

<snip>
>
>6.  For those sites that need it, there will be an option of
>    some sort to cause PmWiki to revert to its existing 2.1.x
>    behavior of using <p class='vspace'></p>.

If we could invoke this option in the pdf channel, then the
only change to wikipublisher would be to turn this option on.

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.


-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list