mirror of
https://github.com/opelly27/streetmerchant.git
synced 2026-05-20 06:27:38 +00:00
fix: add support for stores label text to have uppercase letters (#526)
This commit is contained in:
committed by
GitHub
parent
542b92301a
commit
5ea7cc4ca4
@@ -86,7 +86,7 @@ export async function extractPageContents(page: Page, selector: Selector): Promi
|
||||
*/
|
||||
export function includesLabels(domText: string, searchLabels: string[]): boolean {
|
||||
const domTextLowerCase = domText.toLowerCase();
|
||||
return searchLabels.some(label => domTextLowerCase.includes(label));
|
||||
return searchLabels.some(label => domTextLowerCase.includes(label.toLowerCase()));
|
||||
}
|
||||
|
||||
export async function cardPrice(page: Page, query: Pricing, max: number, options: Selector) {
|
||||
|
||||
Reference in New Issue
Block a user