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

Waylan Limberg waylan at gmail.com
Wed Sep 21 12:19:54 CDT 2005

> >
> > 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
> > spaces?
> In a local customization file:
>    Markup('^ ', 'block', '/^(\\s{4})/', '<:pre,1>$1');
> Demonstrated at http://www.pmwiki.org/wiki/Test/PreSpaces .
> Pm
Many thanks. This is one of the reasons I like Pmwiki so much. You
ask, and you shall receive.

On 9/21/05, Russell Bailey <russell-pmwiki at saberpunk.net> wrote:
> Waylan Limberg wrote:
> >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.
> >
> >
> Personally,  I'd prefer scrolling the preformatted text to getting it
> either cut off or chopped into multiple lines.  The things I use pre for
> are ASCII diagrams and chunks of code,  which can get confusing if
> they're wrapped.  Further,  with scrolling,  I can at least get the
> original chunk back and easy to view by pasting it into a text editor.

Good point. It all depends on what your using pre for. In the project
I'm working on, I'm trying to reproduce the 'Rules of Court' online
while making it easy for the law clerks to edit when a rule is
changed/added etc. These rules include sample forms/exhibits for
attorneys to use. The forms/exhibits are mixed in with text of the
rules and are not really intended for cut and paste. In the original
Word doc (never made public - sent to the printers) the forms where
formatted with  a mishmash of tabs and spaces with underscores to
indicate blanks to be filled in. I needed the non-collapsing
whitespace to show the formatting, but needed wordwrap as well (I
can't be sure the law clerks would hit return at the end of every line
in the edit view - but only when creating forms, not when editing
other text  - talk about confusing) . Unfortunately, html and css
alone did not offer a solution that would work for me. Thus, php's
wordwrap(). I am now ensured that all text (defined as a form/exhibit
with some markup) gets wrapped at the same width as the edit view (its
rather convenient that textarea is monospaced by default and easy to
define a width in characters for) and looks exactly the same in normal
Waylan Limberg
waylan at gmail.com

More information about the pmwiki-users mailing list