[dokuwiki] Re: New Pagemove Plugin (Brainstorming)

On Mon, Mar 22, 2010 at 07:16:33PM +0100, Mykola Ostrovskyy wrote:
> MK>   - the instructions are then turned into normal wiki text again (using
> MK>     a reverse renderer which translates instructions into wiki text)
> 
> The last bullet point can cause some trouble. I don't know if anybody else 
> does it but in some of my
> plugins I do instruction shuffling or even inject extra instructions after 
> the page is parsed. Maybe
> it's not the way PARSER_HANDLER_DONE event was supposed to be used but the 
> fact is that there are
> some nutjobs (like myself) who mess with the instruction stream. Rendering 
> the instructions may
> result in a file that is quite different from original wiki text.
> 
> I think more reliable way would be to use instructions to get offsets of the 
> links in the raw wiki
> text and based on that patch the text files as needed.

Then you end up using regex again, I don't know, but the phrase "more
reliable" than just switching out array values in the instructions list kinda
doesn't sound right to me here ;-).

Can you give an example of what you're doing with the instructions? Do you add
extra plugin instructions (that should be no problem). Or do you something
different?

Regards,
        Michael

-- 
Michael Klier

www:    http://www.chimeric.de
jabber: chi@xxxxxxxxxxxxxxxxxx
key:    http://downloads.chimeric.de/chi.asc
key-id: 0x8308F551

Other related posts: