[pmwiki-users] Pages that do not wrap
Hans
design at softflow.co.uk
Tue Mar 14 01:12:51 CST 2006
Tuesday, March 14, 2006, 6:31:10 AM, Sivakatirswami wrote:
> There is a continuing problem with where long lines do not wrap on
> some pages, causing lines on the whole page to run off to the right.
> Normally I quickly find a space at the beginning of a line and fix it
> But on one page I am unable to diagnose the problem, I've done a low
> level examination of every line. Not one begins with a tab character
> or a space.
Very hard to spot sometimes. I sympathize.
You could try and force pre-formatted text to wrap at a certain width.
Here is a markup re-definition for this:
#automatic wrap preformatted text at max 75 characters:
Markup('^ ', 'block',
'/^(\\s+)(.*)$/e',
"'<:pre,1>$1'.wordwrap(PSS('$2'), 75, '\n$1')");
And you could go further and stop pmwiki from interpreting spaces at
the beginning of paragraphs to mean preformatted text:
# switch off single spaces at line start creates <pre> tags
DisableMarkup('^ ');
And you could be more radical and have all line breaks from the edit textbox
be honoured as linebreaks, instead of being continuos:
# honouring linebreaks
$HTMLPNewline = '<br />';
So this:
line one
line two
line three
comes out as written. No need to do
line one\\
line two\\
line three
(the last can be a source for errors easily overseen with empty
spaces behind \\ )
I find the last two combined quite useful for a site where people dump
content by pasting from text email.
Best,
~Hans
More information about the pmwiki-users
mailing list