[dokuwiki] Re: plugin output information after $match

Hm. I just re-read the plugin tutorial about internal Patterns. Based on
your comment, I finally understand why the 'wikitext with link' would
actually end up in DOKU_LEXER_UNMATCHED. I figured that the lookahead in the
entry pattern would match with it.
For my current plugin I don't think it matters which state it comes through
or am I missing something? Is there another benefit that I don't understand?
All I'm (currently) interested in is that my plugin wraps content properly
around that particular content (before or after the content).

This plugin question is really related to an earlier post where you
explained backlinks and how to try to add them via plugin. At that point I
was using the 'command' plugin. I couldn't figure out how to access the meta
render mode. I did try with the p_meta_data call which you said not to use
and I couldn't get to work anyway.

So I'm creating this plugin that let's docuwiki control the link syntax and
hence deals with backlinks properly.

...martin


On 12/28/06, Chris Smith <chris@xxxxxxxxxxxxx> wrote:

Martin Tschofen wrote:
> I think I get it. But just to make sure, here's what I'm trying to
> accomplish. Simplified:
> addEntryPattern = '{plug [^\d/}]*?\|(?=.*?/})'
> exitPattern = '/}'
>
> This allows for: {plug 100|wikitext with links/} which should be
> converted
> to:
>
> <span class="plug">wikitext with link<span>[...some js that uses 100 as
a
> parameter]</span></span>

Shouldn't that be <span> ...<script>...</script></span>

>
> the handle function state will find for the above example:
> DOKU_LEXER_ENTER: {plug label|
> DOKU_LEXER_MATCHED:wikitext with links

You never mention what pattern you have registered for "MATCHED".  If
you don't register a pattern using addPattern() you'll never get a
handle() call for DOKU_LEXER_MATCHED.


Chris
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: