next-theme / hexo-word-counter

⏱️ Word count and time to read of articles for Hexo, written in Rust
https://www.npmjs.com/package/hexo-word-counter
GNU Lesser General Public License v3.0
28 stars 3 forks source link

what is the difference between v0.0.3 and v0.1.0 #37

Closed CroMarmot closed 1 year ago

CroMarmot commented 1 year ago

recently i merged a security pull request made by dependabot (https://github.com/YeXiaoRain/Blog/pull/21), which is upgrade hexo-word-counter from 0.0.3 to 0.1.0

and the word count changed from 1.1m to 411k

image

image

and this can be reproduced by the following step

411k, https://github.com/YeXiaoRain/Blog/commit/00ded11c79f68853f04cb638f90e585e66c1872e

git clone git@github.com:YeXiaoRain/Blog.git
cd Blog
git checkout 00ded11c79f68853f04cb638f90e585e66c1872e
yarn && hexo clean && hexo s

1.1m, follow the step above

git checkout HEAD~1
rm -rf node_modules/
yarn && hexo clean && hexo s

I would like to know what is the difference between the 0.0.3 and 0.1.0 version of the word count principle, which is a more accurate way of counting words.

stevenjoezhang commented 1 year ago

The new version should be more accurate Release note: https://github.com/next-theme/hexo-word-counter/releases/tag/v0.1.0

CroMarmot commented 1 year ago

I have read the note before, and can't get information about what has changed that affects the count result.


just now, I tried the text below

    天地玄黄,宇宙洪荒。日月盈昃,辰宿列张。

    Test 123, abc

    ```cpp
    hello world
$\sum_{i=0}^n$


the old version 0.0.3 is 61

![Screenshot from 2023-01-24 02-53-41](https://user-images.githubusercontent.com/24691835/214126691-6d7c98e1-cd3b-43db-b896-6479d3d4fb43.png)

and the new version 0.1.0 is 26

![Screenshot from 2023-01-24 02-50-52](https://user-images.githubusercontent.com/24691835/214126634-9631875a-3b8a-4724-9a23-ef6bf52ffe62.png)

I also think the new version should be more accurate.