devdocs
devdocs copied to clipboard
Function "->" is not returned for Clojure search
How to reproduce:
- Go to devdocs.io
- Enable Clojure documentation
- Search for
->
Expected output:
->is found
Actual result:
->is not found.
Additional info:
Seems to be specific to this particular function, as - + ->> -' are returned when searched for.
This seems to be an issue with the search indexing. The -> entry can still be accessed but it just is not shown in search. I'm still not sure exactly what the issue is, though.
Searching for . and .. have the same issue.

From what I see, all the examples you mention are "special characters". Chances are they are not correctly escaped when searching?
->> works fine, so it's not escaping.
- and > are not special characters for Clojure.
Just in case anyone is curious as to why this happens...
The -> string is part of SEPARATORS_REGEXP in searcher.coffee ( /#|::|:-|->|$(?=\w)|-(?=\w)|:(?=\w)|\ [/-&]\ |:\ |\ /g )
When normalizing the query string is equal to a SEPARATOR, it is ignored. So according to the code, -> will never return anything (search is considered invalid)