-
Notifications
You must be signed in to change notification settings - Fork 29
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
File extensions #66
File extensions #66
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
i too agree this looks wayyy better with the link on the top. good call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice PR! Thank you! Please check a couple of comments I left on it.
editor.open() | ||
|
||
constructFileName: -> | ||
extension = mime.extension(@lastResponse.headers['content-type']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ;
is not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
editor.open() | ||
|
||
constructFileName: -> | ||
extension = mime.extension(@lastResponse.headers['content-type']); | ||
"#{@lastRequest.method} #{@lastRequest.url}#{'.' + extension if extension}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is kind of unreadable, could you rewrite it in a way It's easier to read? Thank you! :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, I think It's fine this way 👍
Improves the Open in separate editor feature.
This adds an ability of inferring the appropriate file extension basing on the response Content-Type. The most important point is that this allows Atom to highlight the file nicely and makes working with it easier. (Quiet related with #37.)
I also moved the option to the top as it's really frustrating to scroll down when the response is huge. Here's how it looks now: