nushell/crates/nu-protocol/src
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
..
ast Move most of the peculiar argument handling for external calls into the parser (#13089) 2024-06-19 21:00:03 -07:00
config Fix typo (#12752) 2024-05-03 16:14:13 -05:00
debugger Move most of the peculiar argument handling for external calls into the parser (#13089) 2024-06-19 21:00:03 -07:00
engine Fix usage parsing for commands defined in CRLF (windows) files (#13212) 2024-06-23 18:43:05 -05:00
errors Restrict strings beginning with quote should also ending with quote (#13131) 2024-06-28 09:47:12 +08:00
pipeline Allow byte streams with unknown type to be compatiable with binary (#12959) 2024-05-24 17:54:38 -07:00
plugin Allow plugins to report their own version and store it in the registry (#12883) 2024-06-21 06:27:09 -05:00
process fix: coredump without any messages (#13034) 2024-06-07 08:02:52 -05:00
value Allow missing fields in derived FromValue::from_value calls (#13206) 2024-06-22 13:31:09 -07:00
alias.rs Use CommandType in more places (#12832) 2024-05-18 23:37:31 +00:00
did_you_mean.rs Improve case insensitivity consistency (#10884) 2023-11-08 23:58:54 +01:00
eval_base.rs Move most of the peculiar argument handling for external calls into the parser (#13089) 2024-06-19 21:00:03 -07:00
eval_const.rs implement autoloading (#13217) 2024-06-25 18:31:54 -07:00
example.rs Overhaul the plugin cache file with a new msgpack+brotli format (#12579) 2024-04-21 07:36:26 -05:00
id.rs Span ID Refactor - Step 1 (#12960) 2024-06-05 09:57:14 +08:00
lev_distance.rs Rework for new clippy lints (#12736) 2024-05-02 19:29:03 +02:00
lib.rs Enable reloading changes to a submodule (#13170) 2024-06-25 18:33:37 -07:00
module.rs Enable reloading changes to a submodule (#13170) 2024-06-25 18:33:37 -07:00
parser_path.rs Enable reloading changes to a submodule (#13170) 2024-06-25 18:33:37 -07:00
signature.rs Use CommandType in more places (#12832) 2024-05-18 23:37:31 +00:00
span.rs Span ID Refactor (Step 2): Use SpanId of expressions in some places (#13102) 2024-06-09 12:15:53 +03:00
syntax_shape.rs open, rm, umv, cp, rm and du: Don't globs if inputs are variables or string interpolation (#11886) 2024-02-23 09:17:09 +08:00
ty.rs Shrink the size of Expr (#12610) 2024-04-24 15:46:35 +00:00