[dokuwiki] Re: How to number headlines ?
- From: Chris Smith <chris@xxxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Wed, 05 Apr 2006 01:59:29 +0100
Anika Henke wrote:
Just curious ... Would a plugin like that be too far away from the
(too) often asked for feature allowing certain kinds of formatting and
substi(tu)tion in headlines
(http://bugs.splitbrain.org/?do=details&id=208)??
The problem isn't the headlines its the TOC.
The TOC is formed by extracting the header instructions from the page's
instructions list. If other syntax modes occur in the heading then a
single header will be broken up over several instructions and some of
the character data may not be present in a header instruction. So the
current method of TOC generation would break down.
The issues associated with the above aren't unsolveable, but they are
complex. For me the ideal mechanism would be to revamp TOC creation so
its something that is done by parsing the render output not the
instruction list. Once you allow formatting, its only with the
formatted (render) output that you can guarantee to get the header
character data.
That may not be such a bad solution. A single regex could (probably) be
run over the render output to assemble the header
level info + character data.
Hmmm .... I'll think on that (and would welcome anyone else thinking on
it) :)
Chris
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
Other related posts: