Commit be32d0d029 for wordpress.org
commit be32d0d02993e23ac086729deca58ca9992df41d
Author: wildworks <wildworks@git.wordpress.org>
Date: Thu Nov 26 14:35:59 2026 +0000
Editor: Count numbers in the classic editor word count.
The classic editor's word count now includes numbers such as `2026`, `1,500`, and `$5`, which were previously stripped along with punctuation before counting. This brings it in line with the block editor's word count.
Developed in: https://github.com/WordPress/wordpress-develop/pull/16070
Props sainathpoojary, wildworks.
Fixes #66716.
Built from https://develop.svn.wordpress.org/trunk@65802
git-svn-id: http://core.svn.wordpress.org/trunk@64831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-admin/js/word-count.js b/wp-admin/js/word-count.js
index 4c336582ec..82e48d52fe 100644
--- a/wp-admin/js/word-count.js
+++ b/wp-admin/js/word-count.js
@@ -82,7 +82,7 @@
'[',
// Basic Latin (extract).
- '\u0021-\u0040\u005B-\u0060\u007B-\u007E',
+ '\u0021-\u002F\u003A-\u0040\u005B-\u0060\u007B-\u007E',
// Latin-1 Supplement (extract).
'\u0080-\u00BF\u00D7\u00F7',
diff --git a/wp-admin/js/word-count.min.js b/wp-admin/js/word-count.min.js
index b1d1bf8e6d..ba6731c584 100644
--- a/wp-admin/js/word-count.min.js
+++ b/wp-admin/js/word-count.min.js
@@ -1,2 +1,2 @@
/*! This file is auto-generated */
-!function(){function e(e){var t,s;if(e)for(t in e)e.hasOwnProperty(t)&&(this.settings[t]=e[t]);(s=this.settings.l10n.shortcodes)&&s.length&&(this.settings.shortcodesRegExp=new RegExp("\\[\\/?(?:"+s.join("|")+")[^\\]]*?\\]","g"))}e.prototype.settings={HTMLRegExp:/<\/?[a-z][^>]*?>/gi,HTMLcommentRegExp:/<!--[\s\S]*?-->/g,spaceRegExp:/ | /gi,HTMLEntityRegExp:/&\S+?;/g,connectorRegExp:/--|\u2014/g,removeRegExp:new RegExp(["[","!-@[-`{-~","\x80-\xbf\xd7\xf7","\u2000-\u2bff","\u2e00-\u2e7f","]"].join(""),"g"),astralRegExp:/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wordsRegExp:/\S\s+/g,characters_excluding_spacesRegExp:/\S/g,characters_including_spacesRegExp:/[^\f\n\r\t\v\u00AD\u2028\u2029]/g,l10n:window.wordCountL10n||{}},e.prototype.count=function(e,t){var s=0;return"characters_excluding_spaces"!==(t=t||this.settings.l10n.type)&&"characters_including_spaces"!==t&&(t="words"),s=e&&(e=(e=(e+="\n").replace(this.settings.HTMLRegExp,"\n")).replace(this.settings.HTMLcommentRegExp,""),e=(e=this.settings.shortcodesRegExp?e.replace(this.settings.shortcodesRegExp,"\n"):e).replace(this.settings.spaceRegExp," "),e=(e="words"===t?(e=(e=e.replace(this.settings.HTMLEntityRegExp,"")).replace(this.settings.connectorRegExp," ")).replace(this.settings.removeRegExp,""):(e=e.replace(this.settings.HTMLEntityRegExp,"a")).replace(this.settings.astralRegExp,"a")).match(this.settings[t+"RegExp"]))?e.length:s},window.wp=window.wp||{},window.wp.utils=window.wp.utils||{},window.wp.utils.WordCounter=e}();
\ No newline at end of file
+!function(){function e(e){var t,s;if(e)for(t in e)e.hasOwnProperty(t)&&(this.settings[t]=e[t]);(s=this.settings.l10n.shortcodes)&&s.length&&(this.settings.shortcodesRegExp=new RegExp("\\[\\/?(?:"+s.join("|")+")[^\\]]*?\\]","g"))}e.prototype.settings={HTMLRegExp:/<\/?[a-z][^>]*?>/gi,HTMLcommentRegExp:/<!--[\s\S]*?-->/g,spaceRegExp:/ | /gi,HTMLEntityRegExp:/&\S+?;/g,connectorRegExp:/--|\u2014/g,removeRegExp:new RegExp(["[","!-/:-@[-`{-~","\x80-\xbf\xd7\xf7","\u2000-\u2bff","\u2e00-\u2e7f","]"].join(""),"g"),astralRegExp:/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wordsRegExp:/\S\s+/g,characters_excluding_spacesRegExp:/\S/g,characters_including_spacesRegExp:/[^\f\n\r\t\v\u00AD\u2028\u2029]/g,l10n:window.wordCountL10n||{}},e.prototype.count=function(e,t){var s=0;return"characters_excluding_spaces"!==(t=t||this.settings.l10n.type)&&"characters_including_spaces"!==t&&(t="words"),s=e&&(e=(e=(e+="\n").replace(this.settings.HTMLRegExp,"\n")).replace(this.settings.HTMLcommentRegExp,""),e=(e=this.settings.shortcodesRegExp?e.replace(this.settings.shortcodesRegExp,"\n"):e).replace(this.settings.spaceRegExp," "),e=(e="words"===t?(e=(e=e.replace(this.settings.HTMLEntityRegExp,"")).replace(this.settings.connectorRegExp," ")).replace(this.settings.removeRegExp,""):(e=e.replace(this.settings.HTMLEntityRegExp,"a")).replace(this.settings.astralRegExp,"a")).match(this.settings[t+"RegExp"]))?e.length:s},window.wp=window.wp||{},window.wp.utils=window.wp.utils||{},window.wp.utils.WordCounter=e}();
\ No newline at end of file
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 8650405dc5..b59b4a61f8 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '7.3-alpha-65801';
+$wp_version = '7.3-alpha-65802';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.