Skip to content

Commit 4cd6eea

Browse files
committed
hotfix: Wrong captured tokens fixed
Values starting with a number or float in the name gets captured as a number when it should be captured as a string. Fixed Conditionstate doesn't need an equal sign befire the condition. This has been made optional.
1 parent cd82db9 commit 4cd6eea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

syntaxes/ini.tmLanguage.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3566,7 +3566,7 @@
35663566
]
35673567
},
35683568
"DrawModule-ConditionState": {
3569-
"begin": "(^[ \\t]+)?\\b(Condition[Ss]tate|conditionstate)\\b([ \\t]+)(=)",
3569+
"begin": "(^[ \\t]+)?\\b(Condition[Ss]tate|conditionstate)\\b([ \\t]*)(=)?",
35703570
"beginCaptures": {
35713571
"1": {
35723572
"name": "punctuation.whitespace.ini"
@@ -3595,7 +3595,7 @@
35953595
"include": "#WhiteSpace"
35963596
},
35973597
{
3598-
"begin": "(?<=(\\b(Condition[Ss]tate|conditionstate)\\b)[ \\t]+(=)[ \\t]+)",
3598+
"begin": "(?<=(\\b(Condition[Ss]tate|conditionstate)\\b)[ \\t]*(=)?[ \\t]+)",
35993599
"end": "$",
36003600
"patterns": [
36013601
{
@@ -3794,11 +3794,11 @@
37943794
"Number": {
37953795
"patterns": [
37963796
{
3797-
"match": "-?\\d+(\\.\\d+)?[%fF]?",
3797+
"match": "-?\\d+(\\.\\d+)?[%fF]?(?![\\w\\d\\.-])",
37983798
"name": "constant.numeric.ini"
37993799
},
38003800
{
3801-
"match": "-?\\.\\d+[fF]?",
3801+
"match": "-?\\.\\d+[fF]?(?![\\w\\d\\.-])",
38023802
"name": "constant.numeric.ini"
38033803
},
38043804
{

0 commit comments

Comments
 (0)