-
Notifications
You must be signed in to change notification settings - Fork 0
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
[CLOSED] Fixing issue #2923 - Getting mode from file extension won't always work #2850
Comments
I like this approach... certainly seems to be needed. |
|
Happy to hear that! Can it be "for" instead of "from", though? The latter suggests to me that the language is magically contained in the path, whereas this really is a rather loose association. |
|
Anything else I need to do before this can be merged? |
We will at some point allow the user to set the language for a file themselves. Probably not just for a file extension, but directly for one file. At that point, the path becomes nothing but an arbitrary lookup string, whose contents have nothing to do with the language object returned. On a different angle, I think we're not just getting something that is close to the file name - language ID from a file path, say "css" from "foo.css", but we're getting a whole language object that (eventually) describes a lot more, like the comment syntax. I can't get that "from" the file name, but I can get that "for" the file name. Do you receive value for money or from money? Usually you buy goods with money, and that is the value. Getting value from money would be more like heating your home by burning it or using a coin as a screw driver or something - the inherent value. Now I admit that this is a rather philosophical debate for such a small issue, but I'm having fun here ^^ |
|
|
|
|
|
|
|
|
|
Happens to me all the time, I usually only search in the Thanks a lot! Waiting for |
|
|
|
Thanks for getting this started! |
|
That would be awesome! Though in general I would not expect everybody to add unit tests. I actually thought you might have considered lower-casing it. #3122 will enhance things a bit, though, so that even file names with extensions can be inserted into the fileNames array - to me the name doesn't clearly communicate that it has to be a file name without an extension. By then we're definitely in a place where it's more likely that someone wants this case-insensitive rather than complaining about "MAKEfile" not being displayed as a simple text file. But just like you said, we might be overlooking a scenario. |
Sunday Mar 03, 2013 at 15:53 GMT
Originally opened as adobe/brackets#3029
Fixed issue #2923 Getting mode from file extension won't always work where some files don't have extensions like Makefiles for example.
MarkMurphy included the following code: https://github.com/adobe/brackets/pull/3029/commits
The text was updated successfully, but these errors were encountered: