[pmwiki-devel] [pmwiki-users] New Recipe: LiteralWhiteSpace, was:IntuitiveSpacing

Hans design5 at softflow.co.uk
Sun Mar 18 03:15:44 CDT 2007


Sunday, March 18, 2007, 5:19:55 AM, The wrote:

> Couple questions...  Am I understanding properly what this recipe
> does? What about pages that already have lot's of double slashes to
> end lines.  Will they suddenly show up in the page output?  Does this
> change the underlying code saved to the page at all--or suddenly start
> working on existing pages as expected?

I think the points I listed on
http://www.pmwiki.org/wiki/Cookbook/LiteralWhiteSpace
sum up the recipe comprehensible.

The double backslash markup \\ is not altered or disabled.
But it has no visible effect since the recipe honours linebreaks
anyway with
   $HTMLPNewline = '<br />';

whitespace.php does not alter anything in the page content, the
"source", or the text of the page file. It does not change anything in
the page file (very unlike Fox which is a tool to change page
content). whitespace.php is only interpreting page content differently
than the PmWiki defaults for white space. So any page you view will
show possibly different because of the interpretation (translation) of
white spaces and empty lines. This is happening both for textbox content
and for non-textbox content. It happens on a general level for the
whole page, even including SideBar, RightBar etc subpages.

Some provisions have been made not to interpretate/translate into HTML
any white spaces inside HTML tags, and also not in wiki styles. The
latter by doing the translation after the style markup is processed.

It seems to me that the recipe is no substitute for your "magic
boxes". It would be wrong to force the general white space
interpretation onto a wiki just because you want different rules for
text boxes. In this case I would recommend to the admin to install the
script selectively for a certain group perhaps, like a form or comment
group, where such behaviour may be desired.

Or if you want linebreak behaviour for output from text boxes, you
could have the output preceeded by a (:linebreaks:) and followed by a
(:nolinebreaks:) markup, inserted automatically via the template.
This is already possible and needs no code change.

Hope this makes it clearer for you.

Hans




More information about the pmwiki-devel mailing list