Changeset 8054
- Timestamp:
- 01/09/2019 02:26:21 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/style/trac/wp-trac.js
r8052 r8054 78 78 wpTrac.autocomplete.init(); 79 79 wpTrac.linkMentions(); 80 80 81 81 82 if ( ! $body.hasClass( 'plugins' ) ) { … … 105 106 }, 106 107 107 linkMentions: function( ) {108 linkMentions: function() { 108 109 // See https://github.com/regexps/mentions-regex/blob/master/index.js#L21 109 110 var mentionsRegEx = /(^|[^a-zA-Z0-9_@!@#$%&*])(?:(?:@|@)(?!\/))([a-zA-Z0-9/_\-.]{1,20})(?:\b(?!@|@)|$)/g, 110 111 mentionsInAttrRegEx = new RegExp( '="[^"]*?' + mentionsRegEx.source + '[\\s\\S]*?"' ); 111 112 112 $( 'div.change .comment, #ticket .description' ).each( function() {113 $( 'div.change .comment, #ticket .description' ).each( function() { 113 114 var $comment = $( this ).html(); 114 115 … … 134 135 135 136 // 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 136 176 if ( placeholders.length ) { 137 177 $comment = $comment.replace( '__PLACEHOLDER__', function() { … … 174 214 }; 175 215 }); 216 217 218 176 219 }, 177 220
Note: See TracChangeset
for help on using the changeset viewer.