Ticket #27386: 27386.patch
File 27386.patch, 882 bytes (added by , 10 years ago) |
---|
-
trunk/src/wp-admin/js/word-count.js
6 6 settings : { 7 7 strip : /<[a-zA-Z\/][^<>]*>/g, // strip HTML tags 8 8 clean : /[0-9.(),;:!?%#$¿'"_+=\\/-]+/g, // regexp to remove punctuation, etc. 9 shortcode : /\[[a-zA-z0-9\/][^\[\]]*\]/g, // regexp to detect shortcodes 9 10 w : /\S\s+/g, // word-counting regexp 10 11 c : /\S/g // char-counting regexp for asian languages 11 12 }, … … 29 30 if ( tx ) { 30 31 tx = tx.replace( t.settings.strip, ' ' ).replace( / | /gi, ' ' ); 31 32 tx = tx.replace( t.settings.clean, '' ); 33 tx = tx.replace( t.settings.shortcode, '' ); 32 34 tx.replace( t.settings[type], function(){tc++;} ); 33 35 } 34 36 w.html(tc.toString());