[dokuwiki] Re: darcs changes
- From: Chris Smith <chris@xxxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Wed, 12 Apr 2006 10:19:32 +0100
Andreas Gohr wrote:
---------------------------------------------------------------------
Tue Apr 11 20:27:21 CEST 2006 Andreas Gohr <andi[at]splitbrain.org>
* releaxed header syntax
---------------------------------------------------------------------
What is the status of the header changes after this last patch?
I am curious as to why you chose to stay with an array look up rather
than a strlen check?
For ease of reversing header level syntax?
If so, is it worth moving the $levels array somewhere to make it more
user configurable?
The changes for reversing with strlen are pretty simple:
$level = strlen(hsplit[0]);
if ($level>5) $level = 5;
Also, is it worth putting a "2" restriction on the preg_split. We are
only interested in the string before the first split, everything else is
effectively discarded - which is also why [^=] maybe a simpler pattern
and the PREG flags aren't needed (it was late and I was tired when I
made my post before, otherwise I would have realised what was happening
here, I was mistakenly thinking the other split string was important).
Cheers,
Chris
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
Other related posts: