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

Prioritize first line matches over bundled/non bundled cirteria in grammar scoring #13597

Merged
merged 1 commit into from Oct 20, 2017

Conversation

Projects
None yet
2 participants
@Ingramz
Contributor

Ingramz commented Jan 12, 2017

When detecting grammar to use, the grammar scoring system's bundled/not bundled criteria should be lower priority than first line match. This would enable the use case where user installed grammar intentionally hands over the victory to bundled grammar based on first line match. If the two grammars were equal in terms of first line match, they would be still judged by bundled/non bundled, thus not breaking old intended behavior.

Cases where grammar relied on being a non bundled package, we'll have to at least copy the firstLineMatch of the bundled grammar or have a better one if the bundled package had one. This will be useful in the future nonetheless.

For more details, see atom/first-mate#85

@50Wliu 50Wliu merged commit 1975e37 into atom:master Oct 20, 2017

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment