From 673c0bbce0c650759b63f0b646ea9c5033a8a8fa Mon Sep 17 00:00:00 2001 From: windingwind <33902321+windingwind@users.noreply.github.com> Date: Sun, 13 Oct 2024 22:55:58 +0200 Subject: [PATCH] fix: template render remove: do not support markdown backtick grammar --- src/modules/template/api.ts | 6 ------ src/modules/template/editorWindow.ts | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/modules/template/api.ts b/src/modules/template/api.ts index 04eb5cf..83d9dc6 100644 --- a/src/modules/template/api.ts +++ b/src/modules/template/api.ts @@ -90,16 +90,10 @@ async function runTemplate( }, ); - // Match the backticks not inside a `${}` and replace them with a placeholder - // Not inside a `${}` - templateText = templateText.replace(/`(?![^${]*\})(?${text}", }, { name: "code", - code: "\n```\n${text}\n```\n", + code: "\n
\n${text}\n\n",
},
{
name: "table",