-
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] Correctly selects filename when known extension with a dot inside is used #6544
Comments
Comment by redmunds
This works for a file named test.html.erb, but not test.php.js. That's because the file extension "html.erb" is explicity defined in languages.json, but "php.js" is not. "html.erb" is explicitly defined because it has to be -- it doesn't fit the accepted convention -- the files should be named test.erb.html. We don't want to have to list every combination of "php.*" (and other server-side markup languages) in languages.json -- we should automatically handle them. I think this can be done, without getting tricked by file names such as jquery-1.10.2.min.js, by also trying to match each known file extension part. For the test.php.js case, working backwards, it would check "js", then "php". Of course, it would also have to check "php.js" to handle the "html.erb" case. For the jquery-1.10.2.min.js case it would see "js" is known, but stop searching when it hits "min". Does that make sense? Care to give it a try? |
Comment by zaggino Sure, I want to finish this.
|
Comment by redmunds I think allowing any number of extensions in any combination would be most flexible. |
Comment by zaggino Review again please |
Comment by redmunds This works great! One more thing I notice is that the project tree highlighting still only recognizes the file extension the old way while file renaming recognizes file extension the new way: The project tree highlighting is done in |
Comment by zaggino |
Comment by redmunds Looks great! But, I'm seeing this JSLint unit test fail in your branch, but not in master: "should default to the editor's indent"
Seems like this is more related to your previous pull request. Are you seeing that failure? |
Comment by redmunds Oh, it's because your change to JSLint has not been merged into this branch. Looks good. Merging. |
Issue by zaggino
Tuesday Mar 18, 2014 at 21:54 GMT
Originally opened as adobe/brackets#7242
Follow up for adobe/brackets#7209 in case we wanted to get fancy :-)
This is for #7265
zaggino included the following code: https://github.com/adobe/brackets/pull/7242/commits
The text was updated successfully, but these errors were encountered: