remove shys from Search
This commit is contained in:
		@@ -2,7 +2,6 @@
 | 
			
		||||
    import {onMount} from "svelte";
 | 
			
		||||
    import "$lib/css/nordtheme.css";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
onMount(() => {
 | 
			
		||||
	const recipes = document.querySelectorAll(".search_me");
 | 
			
		||||
	const search = document.getElementById("search");
 | 
			
		||||
@@ -18,7 +17,7 @@ onMount(() => {
 | 
			
		||||
		let scrollers = [];
 | 
			
		||||
    		// for each recipe hide all but matched
 | 
			
		||||
    		recipes.forEach(recipe => {
 | 
			
		||||
      			const searchString = `${recipe.textContent} ${recipe.dataset.tags}`.toLowerCase().normalize('NFD').replace(/\p{Diacritic}/gu, "");
 | 
			
		||||
			const searchString = `${recipe.textContent} ${recipe.dataset.tags}`.toLowerCase().normalize('NFD').replace(/\p{Diacritic}/gu, "").replace(/­|/g, '');
 | 
			
		||||
      			const isMatch = searchTerms.every(term => searchString.includes(term));
 | 
			
		||||
 | 
			
		||||
      			recipe.style.display = (isMatch ? 'flex' : 'none');
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user