[pmwiki-users] New Recipe: IntuitiveSpacing

Hans design5 at softflow.co.uk
Thu Mar 15 14:51:17 CDT 2007


Thursday, March 15, 2007, 7:40:28 PM, Patrick wrote:

> Ouch.  You're likely to run into many problems with this, then,
> because any spaces that occur in the middle of HTML tags will also 
> be converted.  For example, suppose someone creates a markup function
> that somehow produces:

>     <div id='mymarkup'   class='xyz'>...</div>

> They'll be very surprised when the triple spaces inside the element attributes
> are converted to "&nbsp;&nbsp;&nbsp;" .  And I think it's unreasonable to
> require that recipe writers avoid multiple spaces in HTML tags the recipe
> produces, since they're perfectly legal otherwise.

> So, at the very least the function needs to make sure that any spaces it is
> converting aren't in the middle of an HTML tag.

would it perhaps work if the space conversion gets done after style in
the markup translation? This would allow the spaces in wiki styles as
in Site.PageActions.

How do I filter out the html tags though? I need to create a function
for this, and when(where) shall the spacing markup run then in the markup
translation table?


Hans




More information about the pmwiki-users mailing list