Skip to content

Commit

Permalink
rejigger comments
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgoebel committed Jan 13, 2021
1 parent da8b367 commit fecdba6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/languages/python.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export default function(hljs) {
'except',
'finally',
'for',
'',
'from',
'global',
'if',
Expand Down Expand Up @@ -296,9 +295,9 @@ export default function(hljs) {
end: /$/,
keywords: KEYWORDS,
contains: [
{
{ // prevent keywords from coloring `type`
begin: /# type:/
}, // prevent keywords from coloring `type`
},
// comment within a datatype comment includes no keywords
{
begin: /#/,
Expand All @@ -313,8 +312,7 @@ export default function(hljs) {
// Exclude params at functions without params
{
begin: /\(\s*\)/,
skip: true,
className: null
skip: true
},
{
begin: /\(/,
Expand Down Expand Up @@ -350,12 +348,13 @@ export default function(hljs) {
contains: [
PROMPT,
NUMBER,
// eat "if" prior to string so that it won't accidentally be
// labeled as an f-string as in:
{
// very common convention
begin: /\bself\b/
}, // very common convention
},
{
// eat "if" prior to string so that it won't accidentally be
// labeled as an f-string
beginKeywords: "if",
relevance: 0
},
Expand Down Expand Up @@ -395,8 +394,9 @@ export default function(hljs) {
STRING
]
},
// don’t highlight keywords-turned-functions in Python 3
{
begin: /\b(print|exec)\(/ // don’t highlight keywords-turned-functions in Python 3
begin: /\b(print|exec)\(/
}
]
};
Expand Down

0 comments on commit fecdba6

Please sign in to comment.