Describe the issue
Many syntax highlighters identify self in python as a distinct identifier, similar to $this in PHP. Highlight.js does not currently do this.
Which language seems to have the issue?
python
Are you using highlight or highlightAuto?
Both
Sample Code to Reproduce
class SelfTest:
def __init__(self):
self.text = True
def method(self):
pass
Expected behavior
(From Sublime Text)
Actual behavior
Additional context
While the python grammar definition recognizes self, it does not assign it a scope. In contrast, the PHP definition assigns the variable.language scope to $this.
Describe the issue Many syntax highlighters identify
self
in python as a distinct identifier, similar to$this
in PHP. Highlight.js does not currently do this.Which language seems to have the issue? python
Are you using
highlight
orhighlightAuto
? BothSample Code to Reproduce
Expected behavior (From Sublime Text)
Actual behavior
Additional context While the python grammar definition recognizes self, it does not assign it a scope. In contrast, the PHP definition assigns the
variable.language
scope to$this
.