Closed jasonrudolph closed 5 years ago
The diff between these v1.2.0 and v1.2.1 is fairly small (v1.2.0...v1.2.1). Based on my brief investigation so far, I don't think this change was intentional. My hunch is that it's a bug. I'll dig into the commit log to see if I can figure out where exactly the behavior changed and whether it was intentional.
I think I've tracked down the root cause. I believe the issue was introduced in https://github.com/atom/highlights/pull/29, where the logic for selecting a grammar moved out of first-mate
and into a new module (first-mate-select-grammar
).
So far, I'm thinking that we'll need to make a fix to first-mate-select-grammar
. I'm gonna dig into that code and see if I can figure out where to go from here.
Description
highlights
used to be able to detect the grammar based on a file suffix, but that ability appears to no longer be available.Behavior changed in v1.2.1
As far as I can tell, this change in behavior was introduced in v1.2.1.
Using v1.2.0 and earlier, it works as follows:
Notice that first span tag has a class of source ruby, determined based on the file suffix (
.rb
) in the specified file path (/tmp/foo.rb
)Using v1.2.1 or later, it no longer works:
Notice that first span tag has a class of text plain null-grammar.
The diff between these v1.2.0 and v1.2.1 is fairly small (https://github.com/atom/highlights/compare/v1.2.0...v1.2.1). Based on my brief investigation so far, I don't think this change was intentional. My hunch is that it's a bug. I'll dig into the commit log to see if I can figure out where exactly the behavior changed and whether it was intentional.