Ticket #30966: 30966.9.patch
File 30966.9.patch, 810 bytes (added by , 9 years ago) |
---|
-
src/wp-admin/js/word-count.js
15 15 HTMLRegExp: /<\/?[a-z][^>]*?>/gi, 16 16 spaceRegExp: / | /gi, 17 17 removeRegExp: /[0-9.(),;:!?%#$¿'"_+=\\\/-]+/g, 18 astralRegExp: /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, 18 19 wordsRegExp: /\S\s+/g, 19 20 charactersRegExp: /\S/g, 20 21 l10n: window.wordCountL10n || {} … … 32 33 text = text.replace( this.settings.spaceRegExp, ' ' ); 33 34 text = text.replace( this.settings.removeRegExp, '' ); 34 35 36 if ( type === 'characters' ) { 37 text = text.replace( this.settings.astralRegExp, 'a' ); 38 } 39 35 40 text = text.match( this.settings[ type + 'RegExp' ] ); 36 41 37 42 if ( text ) {