wordpress-mobile / WordPress-Android

WordPress for Android
http://android.wordpress.org
GNU General Public License v2.0
2.93k stars 1.31k forks source link

The `getWordCount` method should return 0 when given an empty string #11342

Open maxme opened 4 years ago

maxme commented 4 years ago

Currently it returns 1 when the string is empty. Word count precision is not super important, except for empty posts (we would like to count them).

https://github.com/wordpress-mobile/WordPress-Android/blob/78cfb8812c6fb0edb608bee18cfe59ea64cb47f1/WordPress/src/main/java/org/wordpress/android/util/analytics/AnalyticsUtils.java#L163-L167

dangermattic commented 3 months ago

Thanks for reporting! 👍