Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add template funcs countwords and countrunes #1440
I revisited the functions and aspects @bep mentioned in his comments. To support CJK languages I added the
Usually all functions have a test case to check if they work properly. Since both template functions use the same code as
A quick look at them showed that they used sample content defined in constants. I used them to test my template functions manually and compared the result with the exptected values in the existing test functions and got the same results. So, should I add testing functions anyway?
Finally, I removed the asterisks that were initially added as spacers between the functions to get a better overview.