From cf44e3447145ff76297744b5707e0712c777593f Mon Sep 17 00:00:00 2001 From: mantou132 <709922234@qq.com> Date: Mon, 11 Dec 2023 14:03:16 +0800 Subject: [PATCH] [gem-book] Fixed `gem-pre` --- packages/gem-book/src/element/elements/pre.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/gem-book/src/element/elements/pre.ts b/packages/gem-book/src/element/elements/pre.ts index 76436935..66148880 100644 --- a/packages/gem-book/src/element/elements/pre.ts +++ b/packages/gem-book/src/element/elements/pre.ts @@ -456,10 +456,6 @@ export class Pre extends GemElement { this.effect(async () => { if (this.status === 'hidden') return; if (!this.codeRef.element) return; - // first render - if (!this.codeRef.element.firstElementChild) { - this.codeRef.element.innerHTML = this.innerHTML; - } await import(/* @vite-ignore */ /* webpackIgnore: true */ `${prismjs}?min`); const { Prism } = window as any; if (this.codelang && !Prism.languages[this.codelang]) {