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 6d14895
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/en/01-guide/06-integrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ in addition, custom elements need to be specified in the Vue configuration file:
}
```

In the Vue project, it also supports directly writing custom elements, but [distinguish](../02-elements/card#api) is it Attribute or Property:
In the Vue project, it also supports directly writing custom elements, but [distinguish](../02-elements/card.md) is it Attribute or Property:

<gbp-raw codelang="html" range="34-45" src="https://raw.githubusercontent.com/mantou132/nuxtjs-learn/main/pages/test.vue"></gbp-raw>

Expand Down
2 changes: 1 addition & 1 deletion packages/duoyun-ui/docs/zh/01-guide/06-integrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ DuoyunUI 也导出了 Vue 组件,使用和 React 一样,唯一的区别是
}
```

在 Vue 中也支持直接写自定义元素,但是要[区分](../02-elements/card#api)是 Attribute 还是 Property:
在 Vue 中也支持直接写自定义元素,但是要[区分](../02-elements/card.md#api)是 Attribute 还是 Property:

<gbp-raw codelang="html" range="34-45" src="https://raw.githubusercontent.com/mantou132/nuxtjs-learn/main/pages/test.vue"></gbp-raw>

Expand Down
2 changes: 1 addition & 1 deletion packages/gem-book/src/bin/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export function checkRelativeLink(fullPath: string, docsRootDir: string) {
currentNum += line.length + 1;
}
const position = `(${lineNum},${colNum})`;
console.warn(`\x1b[33m[${new Date()}]: ${fullPath}${position} link warn: ${link}'\x1b[0m`);
console.warn(`\x1b[33m[${new Date().toISOString()}]: ${fullPath}${position} link warn: ${link}'\x1b[0m`);
}
});
}
Expand Down
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 6d14895

Please sign in to comment.