[pmwiki-users] Single Space breaks wrap on entire page

Waylan Limberg waylan at gmail.com
Wed Sep 21 11:21:29 CDT 2005

On 9/21/05, Russell Bailey <russell-pmwiki at saberpunk.net> wrote:
> Patrick R. Michaud wrote:
> >On Wed, Sep 21, 2005 at 09:32:34AM -0400, Waylan Limberg wrote:
> >
> >
> >>>If anyone has any other suggestions, I'm open for them.  :-)
> >>>
> >>>
> >>>
> >>Personally, having just one space affect the formatting is a little
> >>much. Maybe a paragraph should begin with at least four spaces before
> >>getting the pre treatment (kind of like you need four or more dashes
> >>(-----) to make a horizontal line, but not less).
> >>
> >>
> >
> >This is a good point, but changing PmWiki's default here will
> >absolutely break a lot of existing sites that depend on a single
> >space for preformatted text.

Yeah, I figured as much. Thought I'd share anyway. I think I'll start
adding that as a local customization myself. Seeing as I'm not to good
with regex, could someone post a quick and easy way to require four

> >
> >So, requiring multiple spaces for pre treatment would have to be
> >left for a local customization.
> >
> >I wonder if there's something that we could do with <div> and
> >CSS positioning here... i.e., if we enclosed <pre> somehow
> >in a <div> that eliminates the width problem...?
> >
> >

Well, the whitespace property
(http://www.w3.org/TR/REC-CSS2/text.html#white-space-prop) is the one
that controls such things, but there is no way to 'turn on' wraping
without disabiling the other features of pre. Setting
'whitespace:normal' would work for Sivakatirswami; basicaly causing
the browser to treat the <pre> as a <p>. However, when you want
<pre>'s to acts as <pre>'s, then you get nowrap. Which means you have
to have php add in the line breaks for you.

> Maybe a div with its overflow set to scroll,  making the pre text
> basically its own little scrollable frame?

Yeah, overflow would work, and you'd have to use scroll. The thing is,
that could result in a lot of horitontal scrolling. Besides, it makes
the page ugly IMHO. Who wants their pages littered with scrolling
windows. Overflow:hidden would work to, but you'd have no way of
viewing the unwraped text that runs past the left edge of the div.

Waylan Limberg
waylan at gmail.com

More information about the pmwiki-users mailing list