Skip to content

Commit e011568

Browse files
gemini-clilens0021
authored andcommitted
Combine escaping-related sections into a single section
1 parent 04bf53c commit e011568

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docs/0.5.0-alpha/getting_started/migration_guide.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,11 @@ if my_text == "true" {
128128
}
129129
```
130130

131-
# String Literal Escaping Changes <!-- #594 -->
131+
# Escaping Changes
132132

133-
A bug related to the escaping of `$` sequences within string literals has been fixed. Previously, `"\\$variable"` would incorrectly interpolate the value of `variable` instead of treating `$` as a literal character. If your code inadvertently relied on the previous buggy behavior where `\$` within a string literal was interpolated, you will now observe the correct behavior where `\$` is treated as a literal dollar sign. You may need to adjust your string literals if you intended interpolation in such cases.
133+
## String Literal Escaping Changes <!-- #594 -->
134+
135+
A bug related to the escaping of `$` sequences within string literals has been fixed. Previously, `"\$variable"` would incorrectly interpolate the value of `variable` instead of treating `$` as a literal character. If your code inadvertently relied on the previous buggy behavior where `\$` within a string literal was interpolated, you will now observe the correct behavior where `\$` is treated as a literal dollar sign. You may need to adjust your string literals if you intended interpolation in such cases.
134136

135137
**Before (Buggy Behavior):**
136138
```ab
@@ -148,15 +150,15 @@ fun print_var(var: Int): Null {
148150
print_var(45) // Output: \$var (literal dollar sign)
149151
```
150152

151-
# Invalid Escape Sequence Warnings <!-- #732 -->
153+
## Invalid Escape Sequence Warnings <!-- #732 -->
152154

153155
The compiler now issues warnings for invalid escape sequences within string literals. While this does not prevent compilation or change the runtime behavior of your scripts (invalid sequences are still output literally), it helps identify potential mistakes and encourages the use of valid escape sequences. If your build process treats warnings as errors, you may need to address these warnings by correcting the escape sequences or explicitly escaping backslashes.
154156

155157
```ab
156158
echo "Hello \$ World" // This will now produce a warning
157159
```
158160

159-
# Command String Escaping Changes <!-- #772 -->
161+
## Command String Escaping Changes <!-- #772 -->
160162

161163
The internal handling of text within commands has been refactored, leading to a breaking change in how double quotes (`"`) should be escaped within command strings. Previously, `"` might have been escaped with `\"` in some contexts, but this is no longer the correct behavior.
162164

0 commit comments

Comments
 (0)