Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Hurl unicode literal in multiline string #2428

Open
jcamiel opened this issue Feb 14, 2024 · 0 comments
Open

Support Hurl unicode literal in multiline string #2428

jcamiel opened this issue Feb 14, 2024 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@jcamiel
Copy link
Collaborator

jcamiel commented Feb 14, 2024

As written in the Hurl grammar, multiline strings and one line strings should support Hurl unicode literals:

POST https://foo.com
```
Un bon caf\u{e9}!
```

equivalent to:

POST https://foo.com
```
Un bon café!
```

One line strings should be OK also:

POST https://foo.com
`Un bon caf\u{e9}!`

equivalent to

POST https://foo.com
`Un bon café!`

Multiline strings with "Langage hint" also work:

POST https://foo.com
```json
{ 
 "word" :"Un bon ca\u{e9}!"
}
```

While, in the last case, it should be more idiomatic to use a JSON body with JSON unicode literals:

POST https://foo.com
{ 
  "word" :"Un bon ca\u00e9!"
}

Note: we don't support Hurl unicode literals in JSON body as it may add confusion with JSON unicode literals \u{e9} vs \u00e9

@jcamiel jcamiel added the enhancement New feature or request label Feb 14, 2024
@jcamiel jcamiel added this to the 5.0.0 milestone Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant