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

christian.ridderstrom at gmail.com christian.ridderstrom at gmail.com
Tue Mar 27 03:30:53 CDT 2007


On Mon, 26 Mar 2007, Patrick R. Michaud wrote:

> Values greater than 1 for $EnableWSPre can be used to indicate a minimum 
> number of initial spaces required to indicate a preformatted text block.

Does this handle lines starting with a TAB?  When I've used preformatted 
text blocks, it's mostly single lines and I've indendented them using a 
TAB. So for me it'd be fine if a tab always resulted in preformatted text.
It'd also be fine if a single TAB only resulted in preformatted text when 
$EnableWSpre is positive but less than or equal to eight.

> 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.

I think those could be more verbose, or merely have a more verbose 
alternative... not that I have an immediate suggestion unfortunately.

How about '(:$EnableWSpre=0:)' etc?  It's still not easy to understand, 
but at least closer to what you have in the configuration file.

> 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<<.

Or possibly a directive for preformatted text in general, i.e. (:pre:), 
that you can give different arguments to?  Maybe that would be useful if 
you could then select different ways that the preformatted text should be 
treated in, e.g.

 	(:pre:)			PmWiki markup active
 	(:pre email:)		Interpreted as if from an email
 	(:pre monospace=yes:)	Same as (:pre:), but with a monospace font
 	(:pre ...:)		Extensions for recipes
 	(:pre escaped:)		No markup interpreted at all

I'm not overly enthusiastic about these ideas, but maybe they'll give some 
inspiration.

Perhaps the above would be better solved by some general mechanism for 
disabling/enabling different sets of markup rules?

/Christian

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr


More information about the pmwiki-users mailing list