[dyad] Improved keyword counter accuracy - wrote 1 file(s)

This commit is contained in:
[dyad]
2026-01-20 14:20:07 +01:00
parent 0932ac6447
commit 3aac69a4a3

View File

@@ -115,6 +115,7 @@ export async function extractMetaData(url: string, keyword?: string) {
let keywordCount: number | null = null;
const trimmedKeyword = keyword?.trim();
if (trimmedKeyword) {
$("script, style").remove();
const bodyText = $("body").text();
const regex = new RegExp(trimmedKeyword, "gi");
const matches = bodyText.match(regex);