Skip to content

Commit 692b55a

Browse files
Fix highlighting for unused block parameters
What: Removes the distinction between block variables prefixed with underscore and those not prefixed with underscore. Why: As per the github issue: the leading underscore is just a convention. From Ruby's perspective, it's still a parameter and even referring to it still works.
1 parent 8671a04 commit 692b55a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

vscode/grammars/ruby.cson.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2260,16 +2260,13 @@
22602260
"end": "(?=,|\\|\\s*)",
22612261
"patterns": [
22622262
{
2263-
"match": "\\G([&*]?)([a-zA-Z][\\w_]*)|(_[\\w_]*)",
2263+
"match": "\\G([&*]?)([a-zA-Z_][\\w_]*)",
22642264
"captures": {
22652265
"1": {
22662266
"name": "storage.type.variable.ruby"
22672267
},
22682268
"2": {
22692269
"name": "variable.other.block.ruby"
2270-
},
2271-
"3": {
2272-
"name": "variable.other.block.unused.ruby variable.other.constant.ruby"
22732270
}
22742271
}
22752272
}

0 commit comments

Comments
 (0)