Anyway, the script recently began having some problems with the date parser. My original regular expression for pulling the date from the header was hitting a wall with a certain malformed value. You always think it's good enough to get by until something weird comes your way. My new regex date parsing code:
/(\d{1,2})\s(\w{3})\s(\d{4})\s(\d{1,2}):(\d{1,2}):(\d{1,2}).([+-]\d{4})?/i
Ugly, yes. Efficient, no. Functional ... well, at least until the next funky date comes along.One of the effects of the update is that e-mail with an invalid date (or no date at all) are relegated to the bottom of the list. Where they went before I do not know.
I also noticed that the per-page message cache creation loop and display loop were both written incorrectly and thus some weirdness was happening with the inbox listing. (damnable zero-based indexes and what not).
These are not, by the way, the only known bugs. I have quite a bit of work to do to get the message parser up-to-snuff. Among the many problems the most in need of a little work are the few cases where the body of a message will not be displayed. I think it has something to do with HTML-based messages, but I haven't taken any time to fix this one just yet.
No comments:
Post a Comment