Skip to content

fix(javascript): highlight self as a built-in global#4445

Open
xusnitdinov wants to merge 1 commit into
highlightjs:mainfrom
xusnitdinov:highlight-self-global
Open

fix(javascript): highlight self as a built-in global#4445
xusnitdinov wants to merge 1 commit into
highlightjs:mainfrom
xusnitdinov:highlight-self-global

Conversation

@xusnitdinov

Copy link
Copy Markdown

Summary

  • Adds self to BUILT_IN_VARIABLES in ecmascript.js so it is highlighted with the same variable.language class as window and document
  • Adds a markup test covering window, document, and self

Fixes #4339

Test plan

  • npm run build
  • ONLY_LANGUAGES=javascript npm run test-markup (24 passing)

Add self to BUILT_IN_VARIABLES alongside window and document so it
receives the variable.language class in JavaScript highlighting.

Fixes highlightjs#4339

Co-authored-by: Cursor <cursoragent@cursor.com>
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

Successfully merging this pull request may close these issues.

(Javascript) "self" should be highlighted?

1 participant