Pm proposes that we change PmWiki's default so that leading whitespace no longer produces preformatted text by default. Leading whitespace in markup would act just like whitespace in the output (except where it's being used to indicate list indentation).

Of course, the existing PmWiki behavior would be available as an option.

Update: (2007-03-25) This will likely be controlled by an $EnableWSPre configuration variable, which indicates the minimum number of leading spaces required to produce preformatted text. Thus PmWiki's existing default would correspond to a value of 1, while the proposal is suggesting a default of zero (indicating no preformatting based on leading whitespace). Of course, a site administrator can change the default to be whatever is best for the site -- this page is asking what PmWiki's distributed default should be.

The [@...@] markup would continue to generate preformatted text, and we may also introduce a (:pre:)...(:preend:) sequence or perhaps a >>pre<<...>><< sequence for preformatted output.

The main reason that people dislike the preformatted text option is that it generates extremely long lines of output, and authors and administrators don't understand why this occurs.

Use this page to cast your opinion. Ideally put your name and vote weight for each option you have an opinion on; for example, "Pm +1" means Pm likes an option, "Pm -1" means Pm dislikes an option, "Pm +2" and "Pm -2" indicate a strong like or dislike, and "Pm 0" is a neutral vote. It's okay to leave short (one sentence) comments on each proposal, but please keep them short. Longer comments can go on the VoteOnLeadingWhitespace-Talk page.

Option 1: Leading whitespace does not generate preformatted text (new proposal)


Option 2: Leading whitespace generates preformatted text (PmWiki's current default)


Option 3: Lines beginning with four or more spaces generate preformatted text (compromise).


Option 4: Leading whitespace generates preformatted text, but we find ways to keep it from generating long line widths


Side Comments

How-to circumvent long line widths (BenWilson):

pre {overflow: auto;}

For all drastic changes like this, please could you only make it if you supply a script to convert old pages that rely on this to use whatever the replacement is. I use this extensively, and it will be impossible to manually edit each and every page.

You will be able to restore the old behavior simply by setting $EnableWSPre = 1; in local/config.php. -- Pm

Thanks, but if the change is being made, it's for a reason (it must be better), and converting the wiki would be best :)

BenWilson thinks that having a configurable number of white spaces is self-defeating. Users moving from one PmWiki implementation to another would encounter lower consistency which could be at least as confusing as one white space. If leading white space creates pre-formatted text, then it should be set at a fixed value. Alternatively, it is better to use specific markup, as was earlier suggested.

 0: 00.00 00.00 config start
 1: 00.01 00.01 config end
 2: 00.07 00.06 MarkupToHTML begin
 3: 00.28 00.24 MarkupToHTML end
 4: 00.30 00.25 MarkupToHTML begin
 5: 00.34 00.28 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
 6: 00.36 00.29 ReadApprovedUrls SiteAdmin.ApprovedUrls end
 7: 00.39 00.31 MarkupToHTML end
 8: 00.40 00.31 MarkupToHTML begin
 9: 00.42 00.33 MarkupToHTML end
10: 00.44 00.34 now
Peak memory: 6,134,712 bytes