Skip to content

Commit

Permalink
Fix grammar for class and module keyword matching (#2371)
Browse files Browse the repository at this point in the history
Fix grammar for class keyword
  • Loading branch information
andyw8 authored Jul 26, 2024
1 parent fdc3e0c commit a89f026
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vscode/grammars/ruby.cson.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
}
},
"comment": "class Namespace::ClassName < OtherNamespace::OtherClassName",
"match": "(class)\\s+(([a-zA-Z0-9_]+)((::)[a-zA-Z0-9_]+)*)\\s*((<)\\s*(([a-zA-Z0-9_]+)((::)[a-zA-Z0-9_]+)*))?",
"match": "\b(class)\\s+(([a-zA-Z0-9_]+)((::)[a-zA-Z0-9_]+)*)\\s*((<)\\s*(([a-zA-Z0-9_]+)((::)[a-zA-Z0-9_]+)*))?",
"name": "meta.class.ruby"
},
{
Expand All @@ -80,7 +80,7 @@
"name": "punctuation.separator.namespace.ruby"
}
},
"match": "(module)\\s+(([a-zA-Z0-9_]+)((::)[a-zA-Z0-9_]+)*)",
"match": "\b(module)\\s+(([a-zA-Z0-9_]+)((::)[a-zA-Z0-9_]+)*)",
"name": "meta.module.ruby"
},
{
Expand All @@ -92,7 +92,7 @@
"name": "punctuation.separator.inheritance.ruby"
}
},
"match": "(class)\\s*(<<)\\s*",
"match": "\b(class)\\s*(<<)\\s*",
"name": "meta.class.ruby"
},
{
Expand Down

0 comments on commit a89f026

Please sign in to comment.