snowgoon88 / TW5-extendedit

Try to extend the editor of TiddlyWiki5
MIT License
38 stars 10 forks source link

Make bestMatches case insensitive #1

Closed philogit closed 8 years ago

philogit commented 8 years ago

Thank you for your great work on this plugin. One suggestion: Make it so that the completion object returns results regardless of the case (upper or lower) of the user's input.

Changing regpat.test( listChoice[i] ) to regpat.test( listChoice[i].toLowerCase() ) within completion.js changed the behavior for me.

Thanks!

snowgoon88 commented 8 years ago

Yes. I'll add some configuration in next release with case sensitive/insensitive choice. My option is to change var regpat = RegExp( this._regExpEscape(pattern)); to var regpat = RegExp( this._regExpEscape(pattern), "i"); so as to have a case insensitive search.

philogit commented 8 years ago

That works perfectly. Cheers!