Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invisible characters #17

Open
YnirPaz opened this issue Jun 18, 2024 · 4 comments
Open

Invisible characters #17

YnirPaz opened this issue Jun 18, 2024 · 4 comments

Comments

@YnirPaz
Copy link

YnirPaz commented Jun 18, 2024

Having invisible characters in a query (such as "​") will cause no results to show up, resulting in identical looking searches with different results.

@nomeata
Copy link
Owner

nomeata commented Jun 18, 2024

I'm somehow wary of just ignoring them. Maybe what we could do is after pressing search, the entry in the search bar shows them in a visible form, i.e. their escape code ("\123" or whatever the lean syntax is). This way we don't mess with the user input but show the possible mistake.

@YnirPaz
Copy link
Author

YnirPaz commented Jun 18, 2024

That sounds great, as long as loogle recognizes the escape code so you can search the replaced version of course.

@nomeata
Copy link
Owner

nomeata commented Jun 18, 2024

Since Loogle uses the lean parser for strings, that should work out of the box. Doing the replacement in Python is a bit trickier.

@nomeata
Copy link
Owner

nomeata commented Jun 18, 2024

OTOH, it probably not worth spending too much thought about this, so if someone opens a PR to the python code that simply strips certain characters form the input right away, I’d probably merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants