Skip to content

Commit

Permalink
Small corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
LyonSyonII committed Nov 15, 2023
1 parent 767c88b commit 89e1423
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/components/CodeBlock.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
let focused = false;
let playground_response = "";
const handleRun = async () => {
if (!focused) {
const handleRun = async (f = false) => {
if (!f && !focused) {
return;
}
Expand Down Expand Up @@ -63,7 +63,7 @@

<svelte:window
use:shortcut={{
trigger: { key: "Enter", modifier: ["shift"], callback: handleRun },
trigger: { key: "Enter", modifier: ["shift"], callback: () => handleRun() },
}}
/>

Expand Down Expand Up @@ -91,7 +91,7 @@
class="not-content"
title="Run (Shift+Enter)"
disabled={running}
on:click={handleRun}
on:click={() => handleRun(true)}
>
<Icon icon="carbon:run" width={24} />
</button>
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/first-steps/1-introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ But the truth is that this strictness will make you a better programmer, a progr
This is a somewhat special book, as it's structured in 'Quests', where each one will teach you about a specific topic on programming.
Each 'Quest' will have a code snippet, and you'll need to modify it in some way to complete it.

Try running the following snippet (click the "Run" button at the right or "Shift + Enter" on your keyboard):
Try running the following snippet (click the "Run" button at the right or "Shift + Enter" on your keyboard while editing):

<QuestionCard>
<CodeBlock client:only code={'println!("Hello World!")'} />
Expand Down
1 change: 0 additions & 1 deletion src/content/docs/first-steps/2-the-adventurers-guild.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: The Adventurer's Guild
description: An introduction to RustQuest
---

import { Card } from "@astrojs/starlight/components";
import QuestionCard from "@components/QuestionCard.astro";
import CodeBlock from "@components/CodeBlock.svelte";

Expand Down

0 comments on commit 89e1423

Please sign in to comment.