-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(python) identifiers starting with underscore not highlighted
Since hljs version 11, python identifiers starting with an underscore character were no longer highlighted (regression introduced in 952fa0a). Add new python markup test related to identifiers highlighting.
- Loading branch information
Showing
4 changed files
with
37 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<span class="hljs-keyword">def</span> <span class="hljs-title function_">func</span>(): | ||
<span class="hljs-keyword">pass</span> | ||
|
||
<span class="hljs-keyword">def</span> <span class="hljs-title function_">_private_func</span>(): | ||
<span class="hljs-keyword">pass</span> | ||
|
||
<span class="hljs-keyword">class</span> <span class="hljs-title class_">IdentifiersTest</span>: | ||
<span class="hljs-keyword">def</span> <span class="hljs-title function_">__init__</span>(<span class="hljs-params">self</span>): | ||
<span class="hljs-keyword">pass</span> | ||
|
||
<span class="hljs-keyword">def</span> <span class="hljs-title function_">method</span>(<span class="hljs-params">self</span>): | ||
<span class="hljs-keyword">pass</span> | ||
|
||
<span class="hljs-keyword">class</span> <span class="hljs-title class_">_PrivateClass</span>: | ||
<span class="hljs-keyword">pass</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
def func(): | ||
pass | ||
|
||
def _private_func(): | ||
pass | ||
|
||
class IdentifiersTest: | ||
def __init__(self): | ||
pass | ||
|
||
def method(self): | ||
pass | ||
|
||
class _PrivateClass: | ||
pass |