Describe the bug
As title, the wordcount function does not count plain numbers as a word.
To reproduce
Put something like "Should be 4 words"
Expected behavior
Total words (based on the example) should be 4 words (rather than 3)
Screenshots
no
Editor version (please complete the following information):
I use the npm package of @wordpress/wordcount
Desktop (please complete the following information):
Additional context
no
I think the behavior is intended, numbers are no words.
See this test: https://github.com/WordPress/gutenberg/blob/e2d8b7a2c544d1142e7bfbbb1422a609d78e050d/packages/wordcount/src/test/index.test.js#L44-L48
I wouldn't be surprise that's the case. I have done research before raising this, MS Words, and libraries (PHP, JS) I found count numbers as words with no exception. Not that this library has to conform with others but this makes it unusable to most people that are thinking the other way. Will you at least consider an option (or likes) for the alternative behaviour?
Good point, I tested Microsoft Word, Google Docs and Libre office, all apps count numbers as a word. So I think we should change it in WordPress
already tracked at #17988 (specifically https://github.com/WordPress/gutenberg/issues/17988#issuecomment-543066815 ) although that issue is poorly named.
Most helpful comment
Good point, I tested Microsoft Word, Google Docs and Libre office, all apps count numbers as a word. So I think we should change it in WordPress