Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/languages/python.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ export default function(hljs) {
hljs.HASH_COMMENT_MODE,
{
match: [
/def/, /\s+/,
/\bdef/, /\s+/,
IDENT_RE,
],
scope: {
Expand All @@ -397,14 +397,14 @@ export default function(hljs) {
variants: [
{
match: [
/class/, /\s+/,
/\bclass/, /\s+/,
IDENT_RE, /\s*/,
/\(\s*/, IDENT_RE,/\s*\)/
],
},
{
match: [
/class/, /\s+/,
/\bclass/, /\s+/,
IDENT_RE
],
}
Expand Down
5 changes: 5 additions & 0 deletions test/markup/python/false_positives.expect.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
foo = _undef
bar

booger = _unclass
burger
5 changes: 5 additions & 0 deletions test/markup/python/false_positives.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
foo = _undef
bar

booger = _unclass
burger