Xgist
Xgist copied to clipboard
Improve language detection
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.
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.