In benchmarks/loc.js line 9:
const code = (blocks.length ? blocks.join('\n') : text).replace(/\/\*[\s\S]*?\*\//g, '');
Removes all /* ... */ patterns without checking if they're inside string literals. Code like const s = "/* not a comment */"; would lose that line's content, undercounting LOC.
In
benchmarks/loc.jsline 9:Removes all
/* ... */patterns without checking if they're inside string literals. Code likeconst s = "/* not a comment */";would lose that line's content, undercounting LOC.