From b160ee17eecafbf2e18f2ad08757e79b422c67c9 Mon Sep 17 00:00:00 2001 From: Tal Wrii Date: Tue, 7 Jan 2025 03:56:02 +0100 Subject: [PATCH] feat() Show in code blocks --- main.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.ts b/main.ts index aeeb039..19afbeb 100644 --- a/main.ts +++ b/main.ts @@ -453,5 +453,10 @@ function replRequire(vaultPath: string, name: string) { function renderCodeBlock(plugin: ReplPlugin, source: string, el: HTMLElement, ctx: MarkdownPostProcessorContext) { - plugin.runInCodeBlock(el, source) + try { + plugin.runInCodeBlock(el, source) + } catch (e) { + el.appendText(e.message) + el.appendText(e.stack) + } }