highlight.js icon indicating copy to clipboard operation
highlight.js copied to clipboard

Add import operator to the JavaScript language definition

Open nathnolt opened this issue 3 years ago • 4 comments

SEE: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import

No issue made for this.

Changes

Added the import operator function statement to the list of BUILT_IN_VARIABLES and to the noneOf inside of the FUNCTION_CALL object, (although I'm not 100% sure if this is required)

Checklist

  • [ ] Added markup tests, or they don't apply here because...
  • [ ] Updated the changelog at CHANGES.md

Does such a small edit need an edit of changes.md?

nathnolt avatar Jul 20 '22 13:07 nathnolt

Does such a small edit need an edit of changes.md?

Yes.

I wonder though if this shouldn't be a built-in global or even a keyword? variable seems wrong OTTOMH.

joshgoebel avatar Jul 20 '22 13:07 joshgoebel

I don't know man, I just changed it for myself and thought, I guess I could make a pull request.

nathnolt avatar Jul 21 '22 16:07 nathnolt

Also: how do I test out the highlighting, like have it spit out a demo page where I can insert code into, so I can test out if the changes I've made work or not.

nathnolt avatar Jul 21 '22 17:07 nathnolt

so I can test out if the changes I've made work or not.

See the Building and Testing documentation. Build a browser release. Then fire up ./tools/developer.html, that's the easiest way.

joshgoebel avatar Jul 22 '22 02:07 joshgoebel

I just changed it for myself and thought, I guess I could make a pull request.

What exact problem were you trying to solve with this patch?

joshgoebel avatar Sep 12 '22 00:09 joshgoebel

Need to close this up soon if you'd like it in 11.7... that may be the last release before 12.

joshgoebel avatar Sep 14 '22 16:09 joshgoebel

@nathnolt Thanks so much, I went ahead and pushed this all the way home.

joshgoebel avatar Sep 16 '22 19:09 joshgoebel

@joshgoebel thank you

nathnolt avatar Sep 17 '22 17:09 nathnolt