Correctly escape strings.
This commit is contained in:
parent
eed358f38f
commit
57b79b8ff4
3 changed files with 7 additions and 3 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -99,7 +99,7 @@ checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
|
|||
|
||||
[[package]]
|
||||
name = "granite"
|
||||
version = "1.0.2"
|
||||
version = "1.0.3"
|
||||
dependencies = [
|
||||
"clap",
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "granite"
|
||||
version = "1.0.2"
|
||||
version = "1.0.3"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
@ -330,9 +330,13 @@ fn parse(data: &str) -> Result<Program, String> {
|
|||
} else {
|
||||
if char == '\\' {
|
||||
if !string_escape { string_escape = true; }
|
||||
else { argument_builder = format!("{}{}", argument_builder, char); }
|
||||
else {
|
||||
argument_builder = format!("{}{}", argument_builder, char);
|
||||
string_escape = false;
|
||||
}
|
||||
} else {
|
||||
argument_builder = format!("{}{}", argument_builder, char);
|
||||
string_escape = false;
|
||||
}
|
||||
}
|
||||
} else if char == ',' {
|
||||
|
|
Loading…
Reference in a new issue