Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion src/languages/magik.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export default {

'variable': [
/\|[\w?!]+\|/, // variable encased like |var|, |0|, |123|
{ pattern: /(^|[^.])\b[a-z]\w*\b/i, lookbehind: true },
{ pattern: /(^|[^.])[a-z][\w?!]*/i, lookbehind: true },
],
},
};
4 changes: 4 additions & 0 deletions tests/languages/magik/variable_feature.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
a_name
anotherName
some_var
int!okay
ok?
|0|
|123|
|a|
Expand All @@ -14,6 +16,8 @@ coords3d_rope.new_with(coordinate3d.new(0, 0, 0), coordinate3d.new(10, 10, 10))
["variable", "a_name"],
["variable", "anotherName"],
["variable", "some_var"],
["variable", "int!okay"],
["variable", "ok?"],
["variable", "|0|"],
["variable", "|123|"],
["variable", "|a|"],
Expand Down
Loading