[dokuwiki] Syntax Filters: Passing-Through to the Next Handler?

  • From: "B.J. Black" <bj@xxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Fri, 16 Nov 2007 20:56:11 -0800

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all!

So I'm trying to write a syntax plugin that sets NOCACHE when it sees a
PHP tag.  ChrisS suggested that I simply hook the php tag and go from
there (which is a good idea), but...

1.  I can hook the tag (sort ID 179, yada yada), and then:
2.  Set info['cache'] tag, and then:
3.  Nothing.

Well, not exactly nothing.  My code does run (and the page gets
NOCACHE), but the code block itself doesn't.  I assume that this is
because my plugin has "consumed" the tag and so it's not to be processed
any longer (and therefore DW's native PHP handling mechanism never gets
a chance to run).  I've tried things like returning false from render()
with no effect (eh, worth a shot ;-) ), and I can't find anywhere else
to do something useful.

I'd rather not replicate/replace the PHP processing bits (as the code
replacement plugin does with <code>) since that code may change
underneath me at some point (like, it might eventually become something
more interesting than an eval()).

I've looked through various plugins to see what else is out there.
bbcode's bold handler, for example, just connects [b] to "strong," which
 works, but does no additional processing (for fun, I tried connecting
"phpblock" after my code's connection with no luck).  Plus this is the
wrong way to do it, since there may be other things that want to hook
"strong" at some point and bbcode's approach would do an end run around
those.

So the question at hand:  Is there some way for a syntax plugin to just
say "I'm done with this one--let the next-highest-priority handler
(whoever that is) have a crack at it?"

- --bj
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHPnRrBWZe+3ib/AERAi4oAJsGB0PzddD1MJmvWDasB1avGo1nsgCfYmkC
IKSVGtWF6MoPQMIX5aiJPcM=
=YwyV
-----END PGP SIGNATURE-----
-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: