[Pmwiki-users] The [:directive:] vs. (:directive:) question

Patrick R. Michaud pmichaud
Thu Dec 2 21:27:50 CST 2004


On Mon, Nov 15, 2004 at 08:25:26AM +0100, Christian Bartolomaeus wrote:
> Patrick, in your announcement of the release of pmwiki-2.0.devel14 you
> wrote
> 
> > 'It is possible to customize PmWiki to revert back to the [:...:]
> > syntax if that's still desired'--let me know and I'll make a
> > cookbook entry for it.'
> 
> Does that mean that it is possible to customize PmWiki to accept
> [:directive:] as input _and_ to display directives as [:directive:]
> when editing existing pages? 

Sure.

    # convert any (:...:) to [:...:] when a page is saved
    $ROSPatterns['/\\(:(.*?):\\)/'] = '[:$1:]';

    # convert any [:...:] to (:...:) when processing markup
    Markup('[:', '_begin', '/\\[:(.*?):\\]/', '(:$1:)');

Pm



More information about the pmwiki-users mailing list