In src/analyze.ts line 139, the regex used to count "handle-like tokens" in progress output is:
const handleRe = /(?:^|\s)@?[A-Za-z0-9_]{3,}(?=\s|$)/g;
The @? makes the @ optional, so this matches any word 3+ characters long — basically the entire body text. The progress message "123 handle-like tokens" is just a word count and is completely misleading.
You can verify in a browser console:
"the cat sat on the mat".match(/(?:^|\s)@?[A-Za-z0-9_]{3,}(?=\s|$)/g)
// ["the", "cat", "sat", "the", "mat"]
Expected behaviour: only count actual @mention tokens.
Suggested fix — one character change, line 139:
// Before
const handleRe = /(?:^|\s)@?[A-Za-z0-9_]{3,}(?=\s|$)/g;
// After
const HandleRe = /(?<=^|\s)@[A-Za-z0-9_]{3,}(?=\s|$)/g;
In
src/analyze.tsline 139, the regex used to count "handle-like tokens" in progress output is:The
@?makes the@optional, so this matches any word 3+ characters long — basically the entire body text. The progress message"123 handle-like tokens"is just a word count and is completely misleading.You can verify in a browser console:
Expected behaviour: only count actual
@mentiontokens.Suggested fix — one character change, line 139: