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

Invalid injectionSelector key? #17

Closed
pchaigno opened this issue Feb 12, 2018 · 4 comments
Closed

Invalid injectionSelector key? #17

pchaigno opened this issue Feb 12, 2018 · 4 comments

Comments

@pchaigno
Copy link

Is the injectionSelector key serving any purpose? It's detected as invalid on GitHub.com and throwing errors (see github-linguist/linguist#3924 for further details).

@nwhetsell
Copy link
Contributor

nwhetsell commented Feb 12, 2018

I’m assuming you mean

injectionSelector: "L:(meta.rule.action.jisonlex - comment)"

The purpose of that is to scope built-in Jison Lex variables in JavaScript code as variable.language.jisonlex in both Jison Lex and Jison files.

For example, this snippet from a Jison file contains the Jison Lex variable yytext:

{name} return yytext;

yytext is not highlighted on GitHub, but it is highlighted in Atom.

@pchaigno
Copy link
Author

Ok, I see. Thanks for the explanation and the quick answer!
I'll whitelist the injectionSelector key in the compiler. By the way, do you know where I could find documentation on injectionSelector?

@nwhetsell
Copy link
Contributor

No, unfortunately. There are test fixtures for injectionSelector in atom/first-mate (like this), so someone over there may know. I also don’t remember how I figured out how to use injectionSelector; it may have been from looking at atom/language-todo.

@pchaigno
Copy link
Author

Ok. Thanks for the pointers!

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