Skip to content
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

Improve language detection #2

Open
insidegui opened this issue Mar 15, 2017 · 1 comment
Open

Improve language detection #2

insidegui opened this issue Mar 15, 2017 · 1 comment
Assignees

Comments

@insidegui
Copy link
Collaborator

Currently, the extension uses the content UTI to set the extension of the file on Gist, it would be better to detect the language based on the actual contents of the snippet.

@Bunn Bunn assigned Bunn and insidegui and unassigned Bunn Mar 15, 2017
@Bunn
Copy link
Owner

Bunn commented Mar 15, 2017

My only concern with this is adding too much complexity on something the content UTI already provides.

One use case for this would be if the user selects a C++ code inside a .mm file, but then again, a C++ code set as .mm is also correct even if only the C++ code is selected.

The situation where I can see this being useful is if an user has, a string with a XML for example, and only the XML content is selected for the gist. Then, the current approach would not set as XML, but as .swift or something else.

I'll leave it open for now but I consider this to be a low priority issue.

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

No branches or pull requests

2 participants