Feature #955
Additional Message Patterns
Status: | New | Start: | 02/18/2014 | |
Priority: | Low | Due date: | ||
Assigned to: | - | % Done: | 0% |
|
Category: | - | |||
Target version: | - | |||
Complexity: | Low |
|||
Votes: | 0 |
Description
I'm using (?i) in all of these to turn on case-insensitive matching (just FYI)
Microsoft KB urls:
MessagePatterns/0/MessagePartPattern = (?i)\bKB\s*(\d+)
MessagePatterns/0/MessagePartType = url
MessagePatterns/0/LinkFormat = http://support.microsoft.com/kb/{1}
You know, RFCs should link to the HTML version...
(but more to the point, MY patterns should win out over the built-in ones):
MessagePatterns/1/LinkFormat = http://tools.ietf.org/html/{1}
MessagePatterns/1/MessagePartPattern = (?i)\bRFC\s*(\d+)
MessagePatterns/1/MessagePartType = url
PEPs are harder: the numbers in the URL are required to be zero-padded to 4 digits, but nobody writes them like that. I.e.: PEP 8 should link to: http://www.python.org/dev/peps/pep-0008/
This doesn't work right because the number is really a string:
MessagePatterns/2/LinkFormat = http://www.python.org/dev/peps/pep-{1:D4}/
MessagePatterns/2/MessagePartPattern = (?i)\bPEP\s*(\d+)
MessagePatterns/2/MessagePartType = url
History
Updated by Mirco Bauer 3509 days ago
Thank you for sharing this nice patterns! The issue that built-in patterns are applied before your custom ones is actually a bug that should be covered in a separate report.