You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the default implementation of win.file_ext fails on files whose name contains a period or dot; for example, Section 2.5 Metatheory.tex is incorrectly regarded as having an extension of .5 Metatheory.tex. A simple "fix" would be to take the segment after the last dot in the file path (this is what I am currently doing). Unfortunately this would fail for files with multiple extensions, for example project.tar.gz would have an extension of .gz but not of .tar.gz. In reality, both of those are correct. This suggests that win.file_ext should return a set of strings rather than a single string.
The text was updated successfully, but these errors were encountered:
I can't think of any use cases at the moment that need the full extension in the case of a compound extension like .tar.gz, because (1) the only use of win.file_ext that I know of is for language mode detection, and (2) I don't know any programming languages that use a compound extension for their source files. So I think the simplest fix would be to return the segment after the last dot rather than after the first. But I could be wrong about either (1) or (2).
Currently the default implementation of win.file_ext fails on files whose name contains a period or dot; for example,
Section 2.5 Metatheory.tex
is incorrectly regarded as having an extension of.5 Metatheory.tex
. A simple "fix" would be to take the segment after the last dot in the file path (this is what I am currently doing). Unfortunately this would fail for files with multiple extensions, for exampleproject.tar.gz
would have an extension of.gz
but not of.tar.gz
. In reality, both of those are correct. This suggests that win.file_ext should return a set of strings rather than a single string.The text was updated successfully, but these errors were encountered: