[pmwiki-announce] pmwiki-2.2.0-beta41 released (leading spaces update)

Patrick R. Michaud pmichaud at pobox.com
Mon Mar 26 16:40:07 CDT 2007


I've just released pmwiki-2.2.0-beta41, now available at

    http://www.pmwiki.org/pub/pmwiki/pmwiki-2.2.0-beta41.tgz
    http://www.pmwiki.org/pub/pmwiki/pmwiki-2.2.0-beta41.zip
    http://www.sourceforge.net/projects/pmwiki

The major change in this release is that we now have support
for the $EnableWSPre variable, discussed recently on the
pmwiki-users mailing list.  This variable allows a site
administrator to change the number of leading spaces
needed on a markup line to indicate "preformatted text
blocks".  The current default is 1, which means that 
this release defaults to treating lines with leading spaces
exactly the same as in previous releases of PmWiki.

For those sites that want to turn off the leading space
rule, it can be done by setting in local/config.php:

    $EnableWSPre = 0;

We're continuing to look at the possibility (even likelihood)
that the distribution default may change from one to zero
in the near future, so that PmWiki's future default behavior
would be to not treat leading spaces as preformatted text blocks.
If you're certain that you want to keep the existing behavior,
go ahead and set "$EnableWSPre = 1;" now and you won't have
to worry about catching it later if/when it changes in a
future release.  (Yes, we will be announcing it loudly on
the mailing lists and release notes, but it's often nice
to set it and not have to worry about it anymore.)

Values greater than 1 for $EnableWSPre can be used to
indicate a minimum number of initial spaces required to
indicate a preformatted text block.  So, setting $EnableWSPre
to 4 will only treat lines with at least 4 initial spaces
as preformatted text.

I'm also looking at the possibility of introducing (:wspre:), 
(:nowspre:), and (:wspre #:) markups so that the leading
whitespace rule can be selectively enabled and changed
within page markups.  

Lastly, a site administrator can _completely_ disable
the leading whitespace rule with:

    DisableMarkup('^ ');   # argument is caret+space


Finally, this release introduces a new 'pre' wikistyle,
which is a shortcut for setting the CSS 'white-space: pre'
property.  However, we still need to experiment with this
setting a bit, in order to get newlines handled properly
around blocks marked with %pre% or >>pre<<.

Comments and questions welcomed as always.  Thanks!

Pm



More information about the pmwiki-announce mailing list