Skip to content

Commit 6fa2246

Browse files
committed
Fix regex for custom board menu option titles
Due to greedy matching, the previous regular expression matched against option properties in addition to the intended option titles.
1 parent a3744c7 commit 6fa2246

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

etc/schemas/arduino-boards-txt-definitions-schema.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
},
166166
{
167167
"patternProperties": {
168-
"menu\\..+\\..+$": {
168+
"^menu\\.[^.]+\\.[^.]+$": {
169169
"$ref": "#/definitions/propertiesObjects/boardIDMenuMenuIDOptionID/permissive/object"
170170
},
171171
"^[vp]id\\.[0-9]+$": {
@@ -230,7 +230,7 @@
230230
},
231231
{
232232
"patternProperties": {
233-
"menu\\..+\\..+$": {
233+
"^menu\\.[^.]+\\.[^.]+$": {
234234
"$ref": "#/definitions/propertiesObjects/boardIDMenuMenuIDOptionID/specification/object"
235235
},
236236
"^[vp]id\\.[0-9]+$": {
@@ -295,7 +295,7 @@
295295
},
296296
{
297297
"patternProperties": {
298-
"menu\\..+\\..+$": {
298+
"^menu\\.[^.]+\\.[^.]+$": {
299299
"$ref": "#/definitions/propertiesObjects/boardIDMenuMenuIDOptionID/strict/object"
300300
},
301301
"^[vp]id\\.[0-9]+$": {

internal/rule/schema/schemadata/bindata.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ var _arduinoBoardsTxtDefinitionsSchemaJson = []byte(`{
237237
},
238238
{
239239
"patternProperties": {
240-
"menu\\..+\\..+$": {
240+
"^menu\\.[^.]+\\.[^.]+$": {
241241
"$ref": "#/definitions/propertiesObjects/boardIDMenuMenuIDOptionID/permissive/object"
242242
},
243243
"^[vp]id\\.[0-9]+$": {
@@ -302,7 +302,7 @@ var _arduinoBoardsTxtDefinitionsSchemaJson = []byte(`{
302302
},
303303
{
304304
"patternProperties": {
305-
"menu\\..+\\..+$": {
305+
"^menu\\.[^.]+\\.[^.]+$": {
306306
"$ref": "#/definitions/propertiesObjects/boardIDMenuMenuIDOptionID/specification/object"
307307
},
308308
"^[vp]id\\.[0-9]+$": {
@@ -367,7 +367,7 @@ var _arduinoBoardsTxtDefinitionsSchemaJson = []byte(`{
367367
},
368368
{
369369
"patternProperties": {
370-
"menu\\..+\\..+$": {
370+
"^menu\\.[^.]+\\.[^.]+$": {
371371
"$ref": "#/definitions/propertiesObjects/boardIDMenuMenuIDOptionID/strict/object"
372372
},
373373
"^[vp]id\\.[0-9]+$": {

0 commit comments

Comments
 (0)