From e41c15ae6c238b1f792f9ed31b867b1ce01a3e5c Mon Sep 17 00:00:00 2001 From: ckie Date: Sat, 5 Oct 2024 22:19:47 +0300 Subject: [PATCH] lib/Highlight: add button to disable slicing --- src/lib/Highlight.svelte | 12 ++++++++++-- src/routes/demo1/vm.nix | 4 ++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/lib/Highlight.svelte b/src/lib/Highlight.svelte index a34077c..92ba975 100644 --- a/src/lib/Highlight.svelte +++ b/src/lib/Highlight.svelte @@ -8,10 +8,18 @@ export let alt; let renderedCode; - $: renderedCode = slice ? code.replace(/#[^]*?#<\/hidden>/, "") : code;; + $: renderedCode = slice ? code.replace(/#[^]*?#<\/hidden>/, "") : code;

{alt}

-
+
+
+ diff --git a/src/routes/demo1/vm.nix b/src/routes/demo1/vm.nix index 3e17ac4..ea81687 100644 --- a/src/routes/demo1/vm.nix +++ b/src/routes/demo1/vm.nix @@ -17,5 +17,9 @@ with import { }; nixos enable = true; settings.PermitRootLogin = "yes"; }; + # run with: + # nix-build vm.nix -A vm && (rm nixos.qcow2 ; QEMU_NET_OPTS='hostfwd=tcp::3000-:80' ./result/bin/run-nixos-vm) + # xdg-open http://localhost:3000 + # }