Skip to content

Commit 7e76fdb

Browse files
committed
Third time's the charm
1 parent d8ece11 commit 7e76fdb

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/routes/+layout.svelte

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@
66
import NavBar from '$lib/components/shared/NavBar.svelte';
77
import Footer from '$lib/components/shared/Footer.svelte';
88
import SideNav from '$lib/components/shared/SideNav.svelte';
9-
import hljs from 'highlight.js/lib/core';
10-
import c from 'highlight.js/lib/languages/c';
9+
import hljs from 'highlight.js';
1110
import { afterNavigate } from '$app/navigation';
11+
// import { onMount } from 'svelte';
1212
1313
let { children } = $props();
1414
15-
hljs.registerLanguage('c', c);
1615
afterNavigate(() => {
1716
hljs.highlightAll();
1817
});
18+
// onMount(() => {
19+
// hljs.highlightAll();
20+
// });
1921
</script>
2022

2123
<div class="flex min-h-screen flex-col">

src/routes/blog/articles/numworks-programming/+page.svelte

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
the methods provided by the some modules below.
5858
</p>
5959
<Collapsible title="Kandinsky">
60-
<pre><code
60+
<pre><code class="nohighlight"
6161
>get_pixel(x, y) - returns the color of the pixel at (x,y)
6262
set_pixel(x, y, color) - colors the pixel at (x,y)
6363
color(r, g, b) - defines an RGB color
@@ -66,9 +66,9 @@ fill_rect(x, y, w, h, col) - fills a rectangle spanning from (x, y) to (x + w, y
6666
></pre>
6767
</Collapsible>
6868
<Collapsible title="Ion">
69-
<pre><code>keydown(k) - returns true if the key k is down</code></pre>
69+
<pre><code class="nohighlight">keydown(k) - returns true if the key k is down</code></pre>
7070
</Collapsible><Collapsible title="Time"
71-
><pre><code
71+
><pre><code class="nohighlight"
7272
>monotonic() - returns the clock's time (not to be confused with the actual time)
7373
sleep(t) - suspend execution for t seconds</code
7474
></pre>
@@ -116,7 +116,7 @@ sleep(t) - suspend execution for t seconds</code
116116
and also uses a special implementation of python called MicroPython. Digging into the
117117
MicroPython source code, we can find a base definition of an object in C:
118118
</p>
119-
<pre><code
119+
<pre><code class="language-c"
120120
>{`// Anything that wants to be a concrete MicroPython object must have mp_obj_base_t
121121
// as its first member (small ints, qstr objs and inline floats are not concrete).
122122
struct _mp_obj_base_t {
@@ -163,7 +163,7 @@ struct _mp_obj_base_t {
163163
code for the header file, pulled from my latest app at the time of writing, below.
164164
</p>
165165
<Collapsible title="eadk.h">
166-
<pre class="h-96"><code
166+
<pre class="h-96"><code class="language-c"
167167
>{`#ifndef EADK_H
168168
#define EADK_H
169169

0 commit comments

Comments
 (0)