[dokuwiki] Re: Is there a 'parse' function available to plugins?

  • From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Mon, 22 Feb 2010 21:36:04 +0100

>> Is there a DokuWiki parse function available to plugins?

This was asked many, many times before.

> It seems that
>
> $tab = array();
> $html = p_render('xhtml', p_get_instructions("Some **Dokuwiki**
> //markup//"), $tab);
>
> works.

It works but is not recommended. This will instantiate a whole new
parser/renderer process on each call which is very expensive. Better
to use a syntax which can wrap other syntax and can be parsed in one
go.

Andi

-- 
splitbrain.org
-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: