Skip to content

Commit

Permalink
fix: Python functions should be highlighted as functions (#4708)
Browse files Browse the repository at this point in the history
  • Loading branch information
zardam authored May 22, 2022
1 parent 0164811 commit b2aaf1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ace/mode/_test/tokens_python.json
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@
"start",
["keyword","def"],
["text"," "],
["identifier","to_lowercase"],
["entity.name.function","to_lowercase"],
["paren.lparen","("],
["support.function","input"],
["paren.rparen",")"],
Expand Down
3 changes: 3 additions & 0 deletions lib/ace/mode/python_highlight_rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ var PythonHighlightRules = function() {
token: "paren.rparen",
regex: "[\\]\\)\\}]"
}, {
token: ["keyword", "text", "entity.name.function"],
regex: "(def|class)(\\s+)(\\w+)"
}, {
token: "text",
regex: "\\s+"
}, {
Expand Down

0 comments on commit b2aaf1f

Please sign in to comment.