[pmwiki-users] Literal White Space extra space...
Hans
design5 at softflow.co.uk
Sat Mar 24 04:57:01 CDT 2007
Friday, March 23, 2007, 5:29:09 PM, Hans wrote:
>> If you skip a line and then add leading spaces at the beginning of the
>> next line, the space between them roughly doubles in the output. Is
>> there anyway this can be avoided?
> I don't know.
> The markup for leading white spaces whitespace.php uses would need to
> add the $HTMLNewline (<br>) only if the line does not follow an empty
> line. How can this be done?
Is there a markup wizard who can help with this problem?
Markup(':vspace', 'fulltext','/<:vspace>/',"<p class='vspace'> </p>");
translates empty lines.
Markup('^ws', '<^img', '/^(\\s+)(.*?)/e', "WSIndent2('$1')");
for non-list item indents the function returns
"<:p,1>$HTMLPNewline$brsp$sp"
$HTMLPNewline = '<br />';
$brsp$sp gives a number of whitespace substitute characters.
So white spaces at line start add a <br/> tag.
This is fine for lines following directly other lines with text.
But following an empty line there will be one <br/> too many.
Hans
More information about the pmwiki-users
mailing list