MARKMIN problem with email addresses

52 views
Skip to first unread message

David Manns

unread,
May 27, 2015, 9:17:58 AM5/27/15
to web...@googlegroups.com
Using MARKMIN helper, if the string includes something like "... text som...@somewhere.com. Another sentence ..."  the period following the email address is incorrectly included in the email link.

David Manns

unread,
May 30, 2015, 7:49:12 AM5/30/15
to web...@googlegroups.com
This can be resolved by changing one line in markmin2html.py
554 regex_auto = re.compile(r'(?<!["\w>/=])(?P<k>\w+://[\w\d\-+_=?%&/:.,;#]+\w|[\w\-.]+@[\w\-.]+)',re.M)
to 
554 regex_auto = re.compile(r'(?<!["\w>/=])(?P<k>\w+://[\w\d\-+_=?%&/:.,;#]+\w|[\w\-.]+@[\w\-.]*\w+)',re.M)

It seems reasonable that a domain name should not end in '.' or '-'

Massimo Di Pierro

unread,
May 31, 2015, 12:53:53 PM5/31/15
to web...@googlegroups.com, dgm...@gmail.com
Actually technically all domain names are supposed to end in . 


The . is usually omitted because the DNS understand it anyway.

David Manns

unread,
Jun 1, 2015, 11:32:44 AM6/1/15
to web...@googlegroups.com, dgm...@gmail.com
Well, yes, interesting. But in the context of email including a '.' at the end of an email address at the end of the address in mailto: does NOT work. RFC 2821 (SMTP) does not seem to address this issue. In practice, it seems that most email servers will not accept the trailing '.' and messages including it in the recipient address get bounced.

I'm using MARKMIN to format the body of emails sent to an application maintained mailing list. These notices often contain or end with something along the lines of "For more information, please contact x...@yyy.com. Its natural to end the sentence that way and tough to remember not to do so. So I'm leaving my app with the modified code!

Niphlod

unread,
Jun 2, 2015, 9:12:07 AM6/2/15
to web...@googlegroups.com
I'm quite +1 . techinicality that just works for domain may not for everything else passed to regex_auto, and since eveybody is still typing www.google.com rather than www.google.com. I'd go with "mainstream" treatment.
Reply all
Reply to author
Forward
0 new messages