Update verify.js

pull/509/head
AKSHAT ANAND 2025-10-21 19:00:26 +05:30 committed by GitHub
parent c254f01844
commit a12252155c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 2 deletions

View File

@ -83,8 +83,15 @@ const todos = (file) => {
for (let i = 0; i < lines.length; i++) { for (let i = 0; i < lines.length; i++) {
const line = lines[i]; const line = lines[i];
const match = line.match(/\/\/\s*todo([([].*?[)\]])?\s*:?\s*(.*)/i); // Match various TODO comment styles and capture the trailing text
if (match) items.push([i + 1, line, match[0], match[1], match[2]]); const match = line.match(/\/\/\s*todo(?:\s*[::-])?\s*(.*)/i);
if (match) {
// Ignore translation placeholder TODOs (these are expected in many packs)
const text = (match[1] || '').trim();
if (/^translate$/i.test(text) || (/translate/i.test(text) && text.length < 40))
continue;
items.push([i + 1, line, match[0], match[1]]);
}
} }
return items; return items;