hugo icon indicating copy to clipboard operation
hugo copied to clipboard

Fix reading time on mixed CJK/non-CJK text. Fixes #10031

Open DeinAlptraum opened this issue 2 years ago • 3 comments

Fixes the reading time for mixed texts, by computing separete word counts for CJK and non-CJK texts, then computing their reading times separately via the two formulas, and finally summing them up.

Imo this also makes the hasCJKLanguage setting useless for readingTime, please do correct me if I'm wrong here.

DeinAlptraum avatar Jun 18 '22 13:06 DeinAlptraum

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jun 18 '22 13:06 CLAassistant

This PR has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. Please check https://github.com/gohugoio/hugo/blob/master/CONTRIBUTING.md#code-contribution and verify that this code contribution fits with the description. If yes, tell is in a comment. This PR will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

github-actions[bot] avatar Jun 19 '23 02:06 github-actions[bot]

Yes, I believe it fits the description, including closing an open issue.

DeinAlptraum avatar Jun 19 '23 13:06 DeinAlptraum