From 3539a7d77942ac26f2f249ba6e47b50795e6af52 Mon Sep 17 00:00:00 2001 From: Jeremy Howard Date: Wed, 14 Aug 2024 10:38:31 +1000 Subject: [PATCH] fixes #290 --- fasthtml/js.py | 4 ++-- nbs/api/03_js.ipynb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fasthtml/js.py b/fasthtml/js.py index 89bd7c8f..c42a5313 100644 --- a/fasthtml/js.py +++ b/fasthtml/js.py @@ -24,9 +24,9 @@ def dark_media( return Style('@media (prefers-color-scheme: dark) {%s}' %css) # %% ../nbs/api/03_js.ipynb -marked_imp = Script("""import { marked } from "https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js"; +marked_imp = """import { marked } from "https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js"; import { proc_htmx } from "https://cdn.jsdelivr.net/gh/answerdotai/fasthtml-js/fasthtml.js"; -""") +""" npmcdn = 'https://cdn.jsdelivr.net/npm/' # %% ../nbs/api/03_js.ipynb diff --git a/nbs/api/03_js.ipynb b/nbs/api/03_js.ipynb index 8ce69ac5..4e9d8fd1 100644 --- a/nbs/api/03_js.ipynb +++ b/nbs/api/03_js.ipynb @@ -127,9 +127,9 @@ "outputs": [], "source": [ "#| export\n", - "marked_imp = Script(\"\"\"import { marked } from \"https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js\";\n", + "marked_imp = \"\"\"import { marked } from \"https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js\";\n", " import { proc_htmx } from \"https://cdn.jsdelivr.net/gh/answerdotai/fasthtml-js/fasthtml.js\";\n", - "\"\"\")\n", + "\"\"\"\n", "npmcdn = 'https://cdn.jsdelivr.net/npm/'" ] },