diff --git a/wp-admin/js/word-count.js b/wp-admin/js/word-count.js index c1902c39bc..40c2934b9e 100644 --- a/wp-admin/js/word-count.js +++ b/wp-admin/js/word-count.js @@ -17,6 +17,7 @@ removeRegExp: /[0-9.(),;:!?%#$¿'"_+=\\\/-]+/g, wordsRegExp: /\S\s+/g, charactersRegExp: /\S/g, + allRegExp: /[^\f\n\r\t\v\u00ad\u2028\u2029]/g, l10n: window.wordCountL10n || {} }; @@ -26,9 +27,9 @@ type = type || this.settings.l10n.type || 'words'; if ( text ) { - text = ' ' + text + ' '; + text = text + '\n'; - text = text.replace( this.settings.HTMLRegExp, ' ' ); + text = text.replace( this.settings.HTMLRegExp, '\n' ); text = text.replace( this.settings.spaceRegExp, ' ' ); text = text.replace( this.settings.removeRegExp, '' ); diff --git a/wp-admin/js/word-count.min.js b/wp-admin/js/word-count.min.js index 0fd30ecca3..2bb6265369 100644 --- a/wp-admin/js/word-count.min.js +++ b/wp-admin/js/word-count.min.js @@ -1 +1 @@ -!function(){function a(a){var b;if(a)for(b in a)a.hasOwnProperty(b)&&(this.settings[b]=a[b])}a.prototype.settings={HTMLRegExp:/<\/?[a-z][^>]*?>/gi,spaceRegExp:/ | /gi,removeRegExp:/[0-9.(),;:!?%#$¿'"_+=\\\/-]+/g,wordsRegExp:/\S\s+/g,charactersRegExp:/\S/g,l10n:window.wordCountL10n||{}},a.prototype.count=function(a,b){var c=0;return b=b||this.settings.l10n.type||"words",a&&(a=" "+a+" ",a=a.replace(this.settings.HTMLRegExp," "),a=a.replace(this.settings.spaceRegExp," "),a=a.replace(this.settings.removeRegExp,""),a=a.match(this.settings[b+"RegExp"]),a&&(c=a.length)),c},window.wp=window.wp||{},window.wp.utils=window.wp.utils||{},window.wp.utils.WordCounter=a}(); \ No newline at end of file +!function(){function a(a){var b;if(a)for(b in a)a.hasOwnProperty(b)&&(this.settings[b]=a[b])}a.prototype.settings={HTMLRegExp:/<\/?[a-z][^>]*?>/gi,spaceRegExp:/ | /gi,removeRegExp:/[0-9.(),;:!?%#$¿'"_+=\\\/-]+/g,wordsRegExp:/\S\s+/g,charactersRegExp:/\S/g,allRegExp:/[^\f\n\r\t\v\u00ad\u2028\u2029]/g,l10n:window.wordCountL10n||{}},a.prototype.count=function(a,b){var c=0;return b=b||this.settings.l10n.type||"words",a&&(a+="\n",a=a.replace(this.settings.HTMLRegExp,"\n"),a=a.replace(this.settings.spaceRegExp," "),a=a.replace(this.settings.removeRegExp,""),a=a.match(this.settings[b+"RegExp"]),a&&(c=a.length)),c},window.wp=window.wp||{},window.wp.utils=window.wp.utils||{},window.wp.utils.WordCounter=a}(); \ No newline at end of file diff --git a/wp-includes/version.php b/wp-includes/version.php index 4a00a70b03..650b227828 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-beta3-33289'; +$wp_version = '4.3-beta3-33290'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.