[pmwiki-users] Keep() function documented

Joachim Durchholz jo at durchholz.org
Tue Jul 5 15:30:59 CDT 2005


Patrick R. Michaud wrote:
> On Tue, Jul 05, 2005 at 09:55:47PM +0200, Joachim Durchholz wrote:
> 
>>>>Won't the 'L' pool be restored twice then? Not that I'm sure
>>>>whether that would be a bug or a feature...
>>>
>>>Well, no, because once the 'L'-pool is restored, the output no longer
>>>contains any 'L'-pool keep tokens that could be restored a "second"
>>>time.
>>
>>Um, what if one of the texts restored back into the output contains
>>an L-pool token?
> 
> Well, at the moment Keep tokens aren't legally nestable, although 
> we can fix that at some point if we need to.

Um... there's nothing that would prevent a markup from Keep()ing text 
stretches that contain other Keep tokens, or would there be?

It would probably simply "not happen" if markups are processed normally, 
but there's a mechanism for restarting markup rule application IIRC.

> However, supposing that an L-pool token did contain another L-pool
> token, then the first would end up being restored at the normal
> L-pool restoration (just before processing wikistyles), and the
> embedded one would be restored along with all the other keep tokens
> when markup has finished processing.

Of course, that wouldn't necessarily work for more than one level of 
nesting. Or if an L-pool token lives inside the text kept for a ''-pool 
token.

Regards,
Jo



More information about the pmwiki-users mailing list