[pmwiki-users] leading spaces switch for 2.2.0 (somewhat important)

Patrick R. Michaud pmichaud at pobox.com
Sun Mar 25 22:40:05 CDT 2007

On Mon, Mar 26, 2007 at 08:00:13AM +1000, Kathryn Andersen wrote:
> On Sun, Mar 25, 2007 at 02:34:52PM -0500, Patrick R. Michaud wrote:
> > It's even less obvious that something as small as a single leading
> > space is the problem.  When we explain the reason for the long lines
> > to authors, it somewhat makes sense, but at the same time this feels
> > to them like this is a "programmer's feature" and so perhaps the wiki
> > really isn't for them.
> I'm wondering if there could be a compromise: rather than having a
> *single* leading space trigger preformatting, there could be a certain
> number of leading spaces required, like four or eight. One or two spaces
> are likely to be accidental, eight spaces, less so.

I like this suggestion a lot (if only because it means I don't
have to reformat my existing pages), but then the question 
becomes "How many leading spaces?"

I think eight spaces as a minimum is probably too many.  Four would work 
nicely (and would solve the problem for most of PmWiki's built-in pages), 
but I think there are some instances where cut-and-paste may end up with
four leading spaces at the front.

So, I don't know what number of leading spaces would be an appropriate
default.  I'd lean to four, but I don't know that setting it at four
will significantly reduce the scope of the problem.  (And it may be
that a compromise is ultimately more confusing than either extreme.)

Still, it can always be done as a configuration variable, so that
setting $EnableWSPre to a number such as 1, 4, or 8 results in requiring 
that number of leading spaces to treat lines as preformatted text.

What's the consensus opinion here?  If we changed PmWiki's default
leading whitespace rule to require four leading spaces instead of one,
would that (a) resolve a lot of the confusion for authors, and 
(b) significantly reduce the amount of conversion and updating that
needed to be done to existing pages?



More information about the pmwiki-users mailing list