Hans Hagen
the problem is that this is real slow which renders it rather unusable, even the current implementation is already on the edge of acceptable
why do you want to handle the ^'s?
you can do that using the input line callback
That was just a stupid example of some text transformation in order to illustrate how one could do this sort of thing with the proposed changed token_filter semantics. I certainly would not want to do anything like that for actually handling "^^". It was just an example for a less than trivial task solved using token_filter: I find the current semantics of that hook to be quite contorted. Can you think of a particular task implemented using the current token_filter semantics that would become noticeably slower using the simpler semantics I proposed, namely calling token_filter when a token is expected and giving it as an argument a routine to call for fetching a token to transform? I don't see a task that can be implemented better (faster or easier) with the current semantics than with the proposed simplified semantics. Could you give an example? -- David Kastrup