Hi, folks!
Erik Moeller wrote:
our pages while not giving up some editorial liberty.
I therefore fully
support the implementation of this feature, unless the code is completely
nuts ;-)
Actually, I looked at the code to make some changes to my private
language file and didn't understand it. I know somehow what the code
does but not how, because I didn't want to spend that much time decoding
all those regexps that make the code pretty cryptic and hard to maintain
- with the added bonus of not having /any/ documentation.
Why not rearrange the code into two segments: Segment one would parse
the linked date like present in the article into three numerical values:
day, month, year. The second segment then would only have to concat
those values (maybe with a converted month name) into the final form.
This form could be given in the usual "$1 $2 $3 $4" syntax (with e.g. $4
being the month name). That also would take some load off the server
that now has to interpret lots of regexp patterns, which isn't too cheap
because these patterns normally first get converted into some form of a
finite automaton that is eventually given the input string for
processing. (At least the code by Tatu Ylonen proceeds in this way.)
Bye!
Matthias