ssborbis / ContextSearch-web-ext

Search engine manager for modern browsers
338 stars 37 forks source link

Force uppercase/lowercase #657

Closed Bhaalspawn closed 1 year ago

Bhaalspawn commented 1 year ago

how do i force the result to have all lowercase letters even if the name has uppercase letters?

Example From: "Lionel Messi" to "lionel-messi"

i was told to put "/\s+/-/g" to make the "-" appear between the 2 words but i also need the to make L and M uppercase

ssborbis commented 1 year ago

Do you mean you need the search terms changed to lowercase before being used with the engine?

Newer versions can use the following in template strings for search engines %s or {searchTerms} - as selected / mixed case %su or {SEARCHTERMS} - UPPERCASE %sl or {searchterms} - lowercase

TBH, I haven't found a need to verify they work, so please let me know.

Bhaalspawn commented 1 year ago

Don't work Both %sl and {searchterms} work when i use test BUT {searchterms} can't even be saved because t turns back to uppercase when i click "save" %sl just doesn't work even if test was ok

ssborbis commented 1 year ago

I've removed the code that changes {searchterms} back to {searchTerms}. On my machine, %sl and %su work fine, using the Test button and normal use. Is that what you're seeing or no?

If not, maybe right-click that engine and choose export and send me a zip of the .json, or just screenshot the engine form

Bhaalspawn commented 1 year ago

what do you mean you removed the code?? it's still going changing the T on save i don't know why i prefer {searchterms} but at least %sl seems to work now so i'll pass to my next request

ssborbis commented 1 year ago

what do you mean you removed the code?? i

Sorry for the confusion. What I meant was, based on your bug reporting ( thanks btw ), I've removed the code that replaces {searchterms} with {searchTerms} when you save the template. The new code will be in the next release.

Bhaalspawn commented 1 year ago

ok thanks. at the moment %sl is working so it's ok

ssborbis commented 1 year ago

Please re-open this thread if you're still having issues with uppercase / lowercase