Making WordPress.org

Changeset 3821


Ignore:
Timestamp:
08/17/2016 11:12:54 AM (8 years ago)
Author:
ocean90
Message:

Trac: Update mentionsRegEx to support usernames with a -.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/style/trac/wp-trac.js

    r3216 r3821  
    9999        linkMentions: function() {
    100100            // See https://github.com/regexps/mentions-regex/blob/master/index.js#L21
    101             var mentionsRegEx = /(^|[^a-zA-Z0-9_@!@#$%&*])(?:(?:@|@)(?!\/))([a-zA-Z0-9/_.]{1,20})(?:\b(?!@|@)|$)/g,
     101            var mentionsRegEx = /(^|[^a-zA-Z0-9_@!@#$%&*])(?:(?:@|@)(?!\/))([a-zA-Z0-9/_\-.]{1,20})(?:\b(?!@|@)|$)/g,
    102102                mentionsInAttrRegEx = new RegExp( '="[^"]*?' + mentionsRegEx.source + '[\\s\\S]*?"' );
    103103
Note: See TracChangeset for help on using the changeset viewer.