🐛 Ctrl/Cmd in tutorial and make sure to use correct one for OS

This commit is contained in:
Nate Sesti 2024-03-20 16:46:08 -07:00
parent 96074a529d
commit d4d1a8eec9
2 changed files with 8 additions and 8 deletions

View file

@ -12,7 +12,7 @@ You can either
- follow along by clicking the gray CodeLens buttons above the lines, in order, starting with "Begin Section"
"""
# region —————————————————————————— Part 1: Ask a question about code [⌘ L] ——————————————————————————
# region —————————————————————————— Part 1: Ask a question about code [Cmd+L] ——————————————————————————
"""Step 1: Highlight the function below"""
@ -27,14 +27,14 @@ def mysterious_function(x):
return x
"""Step 2: Use the keyboard shortcut [⌘ L] to
"""Step 2: Use the keyboard shortcut [Cmd+L] to
select the code and toggle the Continue input box"""
"""Step 3: Ask a question and press Enter"""
# endregion
# region ————————————————————————————————— Part 2: Edit code [⌘ I] —————————————————————————————————
# region ————————————————————————————————— Part 2: Edit code [Cmd+I] —————————————————————————————————
"""Step 1: Highlight this code"""
@ -53,16 +53,16 @@ def mysterious_function(x):
return x
"""Step 2: Use the keyboard shortcut [⌘ I] to edit"""
"""Step 2: Use the keyboard shortcut [Cmd+I] to edit"""
"""Step 3: Type "<your edit request>" and press Enter"""
"""Step 4: Use keyboard shortcuts to
accept [⌘ ⇧ ⏎] or reject [⌘ ⇧ ⌫] the edit"""
accept [Cmd+Shift+Enter] or reject [Cmd+Shift+Backspace] the edit"""
# endregion
# region ———————————————————————————— Part 3: Debug automatically [⌘ ⇧ R] ————————————————————————————
# region ———————————————————————————— Part 3: Debug automatically [Cmd+Shift+R] ————————————————————————————
"""Step 1: Run this Python file (it should error!)"""
@ -72,7 +72,7 @@ def print_sum(list_to_print):
print(sum(list_to_print))
"""Step 2: Use the keyboard shortcut [⌘ ⇧ R]
"""Step 2: Use the keyboard shortcut [Cmd+Shift+R]
to automatically debug the error"""
print_sum(["a", "b", "c"])

View file

@ -17,7 +17,7 @@ export async function showTutorial() {
// Ensure keyboard shortcuts match OS
if (process.platform !== "darwin") {
let tutorialContent = fs.readFileSync(tutorialPath, "utf8");
tutorialContent = tutorialContent.replace("⌘", "^");
tutorialContent = tutorialContent.replace("⌘", "^").replace("Cmd", "Ctrl");
fs.writeFileSync(tutorialPath, tutorialContent);
}