File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
blog/articles/numworks-programming Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 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' ;
10- import { onMount } from ' svelte' ;
9+ import hljs from ' highlight.js/lib/core' ;
10+ import c from ' highlight.js/lib/languages/c' ;
11+ import { afterNavigate } from ' $app/navigation' ;
1112
12- onMount (() => {
13+ let { children } = $props ();
14+
15+ hljs .registerLanguage (' c' , c );
16+ afterNavigate (() => {
1317 hljs .highlightAll ();
1418 });
1519 </script >
2529 </div >
2630 <div class =" flex grow justify-center" >
2731 <div class =" w-full lg:w-1/2" >
28- < slot />
32+ {@ render children ()}
2933 </div >
3034 </div >
3135 </div >
Original file line number Diff line number Diff line change @@ -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 class = " language-c "
119+ <pre ><code
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).
122122struct _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 class = " language-c "
166+ <pre class =" h-96" ><code
167167 >{` #ifndef EADK_H
168168#define EADK_H
169169
You can’t perform that action at this time.
0 commit comments