[pmwiki-users] Trouble understanding formatting

Patrick R. Michaud pmichaud at pobox.com
Tue Feb 12 10:52:02 CST 2008


On Tue, Feb 12, 2008 at 04:28:51PM +0100, Jan Erik Moström wrote:
> It was explained to me that an empty div-vspace would be joined 
> with the following paragraph. What I have difficulty in 
> understanding is why a similar rule isn't applied before the image.

Short answer: Image tags (<img>) aren't block markup, so it doesn't
make a lot of sense to apply vertical spacing to them.

Longer answer:  PmWiki believes that blank lines in markup should
translate into class='vspace' on output.  In general this is done
using "<div class='vspace'></div>".  However, in order to be able
to style paragraph spacing slightly differently from other elements,
PmWiki converts a blank line before a paragraph into 
"<p class='vspace'>" (instead of "<div class='vspace'></div><p>").
This can be disabled by using 

  DisableMarkup('<vspace><p>');

in which case all blank lines are treated as "<div class='vspace'></div>".

Pm



More information about the pmwiki-users mailing list