Commit 843f59ef authored by dardyfella's avatar dardyfella Committed by Michael Aaron Murphy

fix: Improved parsing and handling of backslashes

Fixes the issue where:

```
let arg = todo
echo -e "\n\n$arg"
```

Returns:

```

ntodo
```

Instead of:

```

todo
```

---

Fixes issue where:

```
echo -e "one\\\\\ntwo\\\\\nthree"
```

Returns:

```
one\\ntwo\\nthree
```

Instead of:

```
one\
two\
three
```
parent c8353e9d
This diff is collapsed.
......@@ -20,3 +20,6 @@ echo *{lock,toml}
echo {L,R}*
echo *{l,t}o??
echo {L*,R*}E
echo [C]argo.tom[l]
echo [C]argo.toml
echo Cargo.tom[l]
\ No newline at end of file
......@@ -15,3 +15,6 @@ Cargo.lock Cargo.toml rustfmt.toml
LICENSE README.md
Cargo.lock Cargo.toml rustfmt.toml
LICENSE
Cargo.toml
Cargo.toml
Cargo.toml
......@@ -56,9 +56,7 @@ two
three
one two three
one\ntwo\nthree
one\
two\
three
one\ntwo\nthree
one two three
apple
sauce
......
echo "[${c::red,bold}asdf${c::default}]"
echo "[${c::red,bold}asdf${c::default}"
echo "${c::red,bold}asdf${c::default}]"
\ No newline at end of file
[asdf]
[asdf
asdf]
......@@ -5,6 +5,7 @@ echo hello%world
echo "\$hello"
echo "\\"
echo "\n"
echo -e "one\\\\\ntwo\\\\\nthree"
echo "\""
echo "<"
echo '<'
......
......@@ -5,6 +5,9 @@ hello%world
$hello
\
\n
one\
two\
three
"
<
<
......
......@@ -2,4 +2,5 @@ let alpha_numeric_name0 = hello
let _name_with_1_leading_underscore = leading
let __2 = underscores
let ___ = !
echo $alpha_numeric_name0 $_name_with_1_leading_underscore $__2 $___
\ No newline at end of file
echo $alpha_numeric_name0 $_name_with_1_leading_underscore $__2 $___
echo -e "\n\n$alpha_numeric_name0"
\ No newline at end of file
hello leading underscores !
hello
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment