From 352a6427df8e12b3b9b019b8d847f54d28a75872 Mon Sep 17 00:00:00 2001 From: Robert Schroll Date: Thu, 15 May 2025 23:31:40 -0700 Subject: [PATCH] Display implementation snippet by reading in source markdown This assumes that we can find the URL of that document in the query string. --- README.md | 208 +++++++----------------------------------------------- 1 file changed, 27 insertions(+), 181 deletions(-) diff --git a/README.md b/README.md index 3320b23..258b4fc 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ comment: Use the real Python in your LiaScript courses, by loading this template. For more information and to see, which Python-modules are accessible visit the [pyodide-website](https://alpha.iodide.io). +@@ snippet start + script: https://cdn.jsdelivr.net/pyodide/v0.27.3/full/pyodide.js @onload @@ -149,6 +151,8 @@ if (window.pyodide_running) {
@end +@@ snippet stop + --> # Pyodide - Template @@ -286,198 +290,40 @@ libraries are globally loaded, if defined within the script. > they might require to download many MB of precompiled packages. ## Implementation + -@Pyodide.eval: @Pyodide.eval_(@uid) - -@Pyodide.eval_ - +@loadsnippet(js) -
-@end -```` --{{1}}-- If you want to minimize loading effort in your LiaScript project, you can also