Commit Graph

3 Commits

Author SHA1 Message Date
Ella Iseulde Van Dorpe 129a3affe5 Editor: word count: exclude more characters
Also only exclude these characters for the `words` type. They should be counted for other types.
Add the ASCIIOnly option to the uglify config to preserve escaped unicode characters.

See #30966. Fixes #27391.



git-svn-id: https://develop.svn.wordpress.org/trunk@33292 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-16 09:44:43 +00:00
iseulde e1242b6979 Editor: word count: add `all` type
This type will count all characters including spaces.

See #30966.


git-svn-id: https://develop.svn.wordpress.org/trunk@33290 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-15 23:47:02 +00:00
Ella Iseulde Van Dorpe fa5ec5077b Editor: restructure word count
* The WordCounter should only do one thing: count words. This makes it also easier to test.
* Add some really basic unit tests.
* Instead of only refreshing the count on enter and delete, refresh the count when the user stops typing. Also look at paste and content changes in TinyMCE.
* Use `match` instead of `replace` when it is appropriate.
* More readable code.

See #30966. Fixes #26620.



git-svn-id: https://develop.svn.wordpress.org/trunk@32856 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-19 10:34:59 +00:00