[pmwiki-users] leading space rule? what rule?

Patrick R. Michaud pmichaud at pobox.com
Thu May 25 17:02:36 CDT 2006


On Thu, May 25, 2006 at 11:33:54PM +0200, christian.ridderstrom at gmail.com wrote:
> On Thu, 25 May 2006, Patrick R. Michaud wrote:
> >On Thu, May 25, 2006 at 11:40:44AM +0200, christian.ridderstrom at gmail.com 
> >>FWIW, I also think it's a mixed blessing to let lines starting with space
> >>result in preformatted text. I think the reason for this choice is mostly
> >>historic and then it's just stuck around...
> >
> >Historic tradition does play a part here, but also using leading 
> >whitespace for preformatted text does tend to do the right thing for 
> >many applications.  If nothing else, a number of other wikis (including 
> >MediaWiki) use this particular convention, so it's worth keeping it.
> 
> I just wonder if the other wikis have it for historic tradition ;-)

Well, in PmWiki's case, historic tradition really was only a part
of the basis for the decision.  I could've eliminated the
whitespace=>preformatted rule in 2.0, but I decided that leading
whitespace really ought to mean *something*, and the only logical 
candidates were preformatted text and indented blocks.  
(And in 2.1 leading whitespace is able to serve both purposes
reasonably well!)

> >For those who want to eliminate the "one space indentation"
> >that results from placing a space at the beginning of preformatted
> >text markup, one can do the following to eliminate the one space
> >of indentation:
> >
> >   Markup('^ ', 'block', '/^\\s/', '<:pre,1>');
> 
> How can I disable the space=>preformatted markup? 

Hmm, there's not currently an easy way to do this (and leave
the other ws-indent rule intact), I'll have to see about
adding it.

Actually, in re-examining the code it looks as though the
Markup() rule I gave above for eliminating the leading space
also fails.  I'll have to fix that as well.  :-|

Pm




More information about the pmwiki-users mailing list