Skip to content

Commit

Permalink
clear code when loading guide
Browse files Browse the repository at this point in the history
  • Loading branch information
leomcelroy committed Oct 20, 2023
1 parent 5b01f55 commit 88b7c6e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion astro/src/components/Help.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styles from './Help.module.css'
import { useState, useEffect } from 'preact/hooks'
import { marked } from 'marked'

import { loadCodeFromString } from "../lib/loadCodeFromString.ts";

marked.setOptions({
highlight: function (code, language) {
Expand Down Expand Up @@ -41,6 +41,8 @@ export default function Help({

if (workshop === null) return

loadCodeFromString("");

const res = await fetch(
`https://raw.githubusercontent.com/hackclub/blot/main/guides/${workshop}.md`
)
Expand Down

1 comment on commit 88b7c6e

@vercel
Copy link

@vercel vercel bot commented on 88b7c6e Oct 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

blot – ./astro

blot-git-main.hackclub.dev
blot.hackclub.dev

Please sign in to comment.