Skip to content

Commit

Permalink
[gem-book] Fixed gem-pre
Browse files Browse the repository at this point in the history
  • Loading branch information
mantou132 committed Dec 11, 2023
1 parent 3614b14 commit cf44e34
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions packages/gem-book/src/element/elements/pre.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]) {
Expand Down

0 comments on commit cf44e34

Please sign in to comment.