Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Handle entries with spaces #3

Merged
merged 3 commits into from
Feb 27, 2014
Merged

Conversation

amccloud
Copy link
Contributor

No description provided.

@amccloud
Copy link
Contributor Author

Okay this should be all good 👍

@@ -32,6 +32,7 @@ basenameScore = (string, query, score) ->
module.exports = (candidates, query, {key, maxResults}={}) ->
if query
queryHasNoSlashes = query.indexOf('/') is -1
query = query.replace(/\ /g, '')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just trying to replace spaces right? I don't think you need to escape \ the space, am I missing something?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The coffeeScript freaks out when you use an regex like / /. So I think /\ /g is the way to go.

@amccloud
Copy link
Contributor Author

I was getting a coffeescript syntax error without escaping the space. The error was something like "unexpected MATH".

@probablycorey
Copy link

Fixes atom/fuzzy-finder#10

probablycorey pushed a commit that referenced this pull request Feb 27, 2014
@probablycorey probablycorey merged commit d136bab into atom:master Feb 27, 2014
@probablycorey
Copy link

Thanks @amccloud!

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

Successfully merging this pull request may close these issues.

3 participants