Yep, that seems to work. Thanks!
Though, I couldn't save my bits in persistent metadata from the
handle() function:
function handle($match, $state, $pos, &$handler){
global $ID;
switch ($state) {
case DOKU_LEXER_ENTER :
$this->count++;
return array($state);
case DOKU_LEXER_EXIT :
$result = p_set_metadata($ID, array('devel' => $this->count));
return array($state, $result);
}
return array();
}
At the render time I print the
$result[/m] from data passed to the [m]render()[/m] and it reads 1. But there is no 'devel' key in the [m].meta file. Is it expected behavior?