You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using your javascript code in a project and I have make some changes. I paste the top of the function with the changes.
// accent_folded_hilite("Fulanilo López", 'lo')// --> "Fulani<b>lo</b> <b>Ló</b>pez"//functionaccent_folded_hilite(str,q){varstr_folded=accent_fold(str).toLowerCase().replace(/[<>]+/g,'');// ORIGINAL CODE THAT ONLY ALLOW A STRING// var q_folded = accent_fold(q).toLowerCase().replace(/[<>]+/g, '');// MODIFIED CODE TO ALLOW AN ARRAY INSTEAD OF A STRINGvarq_folded=[];for(variinq){q_folded[i]=accent_fold(q[i]).toLowerCase().replace(/[<>]+/g,'');}// create an intermediary string with hilite hints// example: fulani<lo> <lo>pez// ORIGINAL CODE THAT ONLY ALLOW A STRING// var re = new RegExp(q_folded, 'g');// var hilite_hints = str_folded.replace(re, '<'+q_folded+'>');// MODIFIED CODE TO ALLOW AN ARRAY INSTEAD OF A STRINGvarhilite_hints=str_folded;varre=null;for(variinq){re=newRegExp(q_folded[i],'g');hilite_hints=hilite_hints.replace(re,'<'+q_folded[i]+'>');}...
Hi.
I'm using your javascript code in a project and I have make some changes. I paste the top of the function with the changes.
You can see the project here: https://trifacho.github.io
The text was updated successfully, but these errors were encountered: