[Webkit-unassigned] [Bug 84582] webkitpy: changelog crashes when parsing authors containing + or ,

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 23 14:45:16 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=84582





--- Comment #9 from Dirk Pranke <dpranke at chromium.org>  2012-04-23 14:45:16 PST ---
(From update of attachment 138318)
View in context: https://bugs.webkit.org/attachment.cgi?id=138318&action=review

> Tools/Scripts/webkitpy/common/checkout/changelog.py:147
> +        return [{'name': name, 'email': email} for name, email in re.findall(r'(?P<name>.+?)\s+<(?P<email>[^>]+)>(?:\s*(?:,(?:\s+and\s+|&)?|(?:^|\s+)and\s+|&&|[/+&])\s*)?', text) if text]

Is it possible to implement this correctly without merging the regexps? Frankly, both of these regexps were already verging on unmaintainable.

I'd be surprised if this code is particularly performance critical, so if it isn't, I would suggest splitting this (or at least _split_contributor_names() ) up into multiple regexps bracketed by if/elses in order to make the code easier to comprehend.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list