Le 2007-06-15 à 3:44, Ron Hale-Evans a écrit :

If no one wants to fix (or "fix") it, it should at least be documented. I am a technical writer by trade and will be happy to document the problem if someone will point me to the documentation leads for both projects.

I think the fix is easy: make the "random" encoding deterministic. I've done it for PHP Markdown recently by adding a custom pseudo- random generator to replace the standard random function used by the algorithm. The new generator is seeded with a checksum of the email address; this makes it deterministic.

If someone wants to port that change to Perl, I'll be glad to help. Here are the relevant two lines of code from the `encodeEmailAddress` function of PHP Markdown:

   # Deterministic seed.
   $seed = (int)abs(crc32($addr) / strlen($addr));

   # Pseudo-random function.
   $r = ($seed * (1 + $key)) % 100;

(Note: $key is the index of the current character.)


Michel Fortin
[EMAIL PROTECTED]
http://www.michelf.com/


_______________________________________________
Markdown-Discuss mailing list
[email protected]
http://six.pairlist.net/mailman/listinfo/markdown-discuss

Reply via email to