fix: space in any param name is blocking the loading of the request file in GUI (#2878)

Adjusted Bruno grammar so the `key` element does not disallow spaces (leading and trailing space is still trimmed).
This commit is contained in:
Mateusz Pietryga 2024-08-22 22:17:57 +02:00
parent 6320a80cbe
commit 82e53ac424
No known key found for this signature in database
GPG Key ID: 549A107FB8327670
3 changed files with 14 additions and 1 deletions

View File

@ -33,7 +33,7 @@ const grammar = ohm.grammar(`Bru {
stnl = st | nl
tagend = nl "}"
optionalnl = ~tagend nl
keychar = ~(tagend | st | nl | ":") any
keychar = ~(tagend | "\\t" | nl | ":") any
valuechar = ~(nl | tagend) any
// Multiline text block surrounded by '''

View File

@ -13,6 +13,7 @@ get {
params:query {
apiKey: secret
numbers: 998877665
multi word param: is allowed
~message: hello
}
@ -23,6 +24,7 @@ params:path {
headers {
content-type: application/json
Authorization: Bearer 123
multi word header: is allowed
~transaction-id: {{transactionId}}
}

View File

@ -23,6 +23,12 @@
"type": "query",
"enabled": true
},
{
"name" : "multi word param",
"value" : "is allowed",
"type": "query",
"enabled": true
},
{
"name": "message",
"value": "hello",
@ -47,6 +53,11 @@
"value": "Bearer 123",
"enabled": true
},
{
"name" : "multi word header",
"value" : "is allowed",
"enabled": true
},
{
"name": "transaction-id",
"value": "{{transactionId}}",