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

Patrick R. Michaud pmichaud at pobox.com
Sun Apr 2 21:18:55 CDT 2006


On Mon, Apr 03, 2006 at 12:57:11PM +1200, John Rankin wrote:
> 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.

Oddly enough, this is *exactly* the thought that occurred to me
as I was out running errands this evening!  :-)

So, here's my new proposal:

- The default value of $HTMLVSpace will change from 
  "<p class='vspace'></p>" to "<div class='vspace'></div>".

- PmWiki will add a new markup rule, to occur late in processing
  (i.e., after wikistyles), that will convert things like

     <div class='vspace'></div><p>   and

     <div class='vspace'></div><p class='xyz'>

  to

     <p class='vspace'>    and

     <p class='vspace xyz'>

Consequences of this proposal:

- Sites that are setting a custom value of $HTMLVSpace will
  continue to work as before (unless, of course, they have been
  setting $HTMLVSpace to "<div class='vspace'></div>", which
  seems unlikely).

- Sites that want to preserve the current behavior can 
  simply set $HTMLVSpace="<p class='vspace'></p>"; and everything
  will work exactly as it has worked in the past.

- The custom markup rule can easily be disabled by DisableMarkup(),
  for those sites that would prefer to keep the extra <div> tags
  before paragraphs.

- An alternate custom markup rule can be made available in the 
  Cookbook that will coalesce the <div class='vspace'></div>
  into class="vspace" attributes for list items, definitions,
  tables, and other elements in addition to paragraphs.

- The wikistyles code remains unchanged.  (Yay!)

Pm




More information about the pmwiki-users mailing list