Wind
57452337ff
Restrict strings beginning with quote should also ending with quote (#13131)
# Description
Closes: #13010
It adds an additional check inside `parse_string`, and returns
`unbalanced quote` if input string is unbalanced
# User-Facing Changes
After this pr, the following is no longer allowed:
```nushell
❯ "asdfasdf"asdfasdf
Error: nu::parser::extra_token_after_closing_delimiter
× Invaild characters after closing delimiter
╭─[entry #1:1:11]
1 │ "asdfasdf"asdfasdf
· ────┬───
· ╰── invalid characters
╰────
help: Try removing them.
❯ 'asdfasd'adsfadf
Error: nu::parser::extra_token_after_closing_delimiter
× Invaild characters after closing delimiter
╭─[entry #2:1:10]
1 │ 'asdfasd'adsfadf
· ───┬───
· ╰── invalid characters
╰────
help: Try removing them.
```
# Tests + Formatting
Added 1 test
2024-06-28 09:47:12 +08:00
..
2024-05-13 13:37:53 +00:00
2024-05-13 13:37:53 +00:00
2024-05-13 13:37:53 +00:00
2024-05-13 13:37:53 +00:00
2024-05-13 13:37:53 +00:00
2024-05-13 13:37:53 +00:00
2024-05-13 13:37:53 +00:00
2024-05-13 13:37:53 +00:00
2024-05-16 10:50:29 +02:00
2024-05-19 19:56:33 +02:00
2024-05-13 13:37:53 +00:00
2024-05-13 13:37:53 +00:00
2024-05-13 13:37:53 +00:00
2024-05-13 13:37:53 +00:00
2024-05-13 13:37:53 +00:00
2024-05-23 02:05:27 +00:00
2024-05-13 13:37:53 +00:00
2024-05-13 13:37:53 +00:00
2024-06-23 18:43:05 -05:00
2024-05-13 13:37:53 +00:00
2024-05-13 13:37:53 +00:00
2024-05-13 13:37:53 +00:00
2024-05-23 02:05:27 +00:00
2024-05-13 13:37:53 +00:00
2024-06-28 09:47:12 +08:00
2024-05-13 13:37:53 +00:00
2024-05-13 13:37:53 +00:00
2024-05-13 13:37:53 +00:00