[dokuwiki] Re: Links: various questions


On 23 Feb 2009, at 22:24, Dmitry Katsubo wrote:


Andreas replied that this is not possible within DokuWiki. But can I,
for example, reuse the same technique as for footers? Footers support
formatting. Can somebody tell me the role of Doku_Handler_Nest and why
'footnote' is 'formatting' and not 'substition'?


The handler creates a list (array) of "instructions", renderer method calls + data to be processed by each call. Doku_Handler_Nest allows one wiki instruction to contain a list of wiki instructions.

Substition can not contain formatting, its a simple replace the wiki syntax with something else. No further parsing is done on the substition contents by the dokuwiki parser.

Formatting has open and close patterns and represents a group of modes that are inline and can contain other formatting syntax as well as substition. Its desirable for footnotes to contain markup, so they aren't substition.

You may well be able to use Doku_Handler_Nest to process the link label. I did try to construct the class to work with plugins. However, it may be difficult to ensure the html generated is valid.

A syntax mode can control what other syntax modes can appear within it. However DokuWiki has no mechanism for influencing what those other syntax modes allow. E.g. HTML does not allow a link to appear within a link. But if the parser allows a link to include bold and also allows bold to contain a link then DokuWiki can generate invalid html - a link within a link.

- Chris


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

Other related posts: