[dokuwiki] Re: Line-break preservation in Wiki text

On Sun, 24 Feb 2008 03:22:07 +0000
Christopher Smith <chris@xxxxxxxxxxxxx> wrote:

> >> (4) Add a config setting to select the xhtml renderer in much the
> >> same way as auth backends or templates are selected.
> >
> > That one is very interesting. It would mean to create new renderer
> > class which inherits from the standard xhtml renderer replacing or
> > extending its standard methods. This would be easy to implement
> > using renderer plugins and a mechanism to define one renderer as
> > the default renderer. The overhead would be minimal and we would
> > have much added flexibility. But you only could use *one* of those
> > plugins using this method. I still like this approach as it could
> > make a lot of sense for plugins like the Creole one.
> >
> 
> I would do this in a similar manner to the way both templates and
> auth backends are handled. The  Config manager provides a list of  
> alternatives and the wiki admin chooses the one they want to use.   
> Right now the renderer class name is based on the renderer format  
> (e.g. xhtml -> Doku_Renderer_xhtml).  It would be necessary to add  
> another level of separation, e.g.  $renderer_class =
> 'Doku_Renderer_'. $renderer_lookup['xhtml'];

I wouldn't go that far. Any renderer can be called by using the export
method already. Instead I'd suggest a $conf['default_renderer'] set to
'xhtml' usually. This would be the renderer for the default output,
users then could set any renderplugin as default_renderer. Usually one
which derives from the standard xhtml renderer.

Andi

-- 
http://www.splitbrain.org

Other related posts: