Making WordPress.org

Changeset 8054

Timestamp:
01/09/2019 02:26:21 AM (6 years ago)
Author:
dd32
Message:

Trac: Autolink Gutenberg Github issues using the form GB-1234 or GB1234.

Fixes #3961.

File:
1 edited

Legend:

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

    r8052 r8054  
    7878            wpTrac.autocomplete.init();
    7979            wpTrac.linkMentions();
     80
    8081
    8182            if ( ! $body.hasClass( 'plugins' ) ) {
     
    105106        },
    106107
    107         linkMentions: function() {
     108        linkMentions: function() {
    108109            // See https://github.com/regexps/mentions-regex/blob/master/index.js#L21
    109110            var mentionsRegEx = /(^|[^a-zA-Z0-9_@!@#$%&*])(?:(?:@|@)(?!\/))([a-zA-Z0-9/_\-.]{1,20})(?:\b(?!@|@)|$)/g,
    110111                mentionsInAttrRegEx = new RegExp( '="[^"]*?' + mentionsRegEx.source + '[\\s\\S]*?"' );
    111112
    112             $( 'div.change .comment, #ticket .description' ).each( function() {
     113            $( 'div.change .comment, #ticket .description' ).each( function() {
    113114                var $comment = $( this ).html();
    114115
     
    134135
    135136                    // Restore mentions in HTML attributes.
     137
     138
     139
     140
     141
     142
     143
     144
     145
     146
     147
     148
     149
     150
     151
     152
     153
     154
     155
     156
     157
     158
     159
     160
     161
     162
     163
     164
     165
     166
     167
     168
     169
     170
     171
     172
     173
     174
     175
    136176                    if ( placeholders.length ) {
    137177                        $comment = $comment.replace( '__PLACEHOLDER__', function() {
     
    174214                };
    175215            });
     216
     217
     218
    176219        },
    177220
Note: See TracChangeset for help on using the changeset viewer.