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

The Editor editor at fast.st
Tue Mar 27 05:05:01 CDT 2007


On 3/27/07, christian.ridderstrom at gmail.com
<christian.ridderstrom at gmail.com> wrote:
> 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.

But then again, those cutting a pasting a text document generally use
tabs for paragraph indents also.  So just disabling preformatted text
for 5 charachters and not tabs doesn't really solve all the problem.
Again, the key is options...

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

Ths is a good idea...  Though generally I'd want to set things
sitewide in a config 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?

I think this is a great idea, as it opens doors for various kinds of
options down the road.  Especially if the same kind of settings could
be set in a config file as well. From the discussion so far, we've
seen we use these things quite differently.  I'd like options to be
able to get something close to LWS in core.  And like being able to
turn on or off various aspects of that.  It would help clarify to me
the difference between [= =] and [@ @], etc.

Good suggestion Christian!

Cheers,
Dan



More information about the pmwiki-users mailing list