diff --git a/demo/App.tsx b/demo/App.tsx index bce9c25..bbea030 100644 --- a/demo/App.tsx +++ b/demo/App.tsx @@ -39,6 +39,19 @@ function foo() { } \`\`\` +\`\`\`ts +export type Person = { + name: string + age: number +} +export function gerPerson(): Person { + return { + name: "name", + age: 33, + } +} +\`\`\` + \`inline code\` https://voting.opensquare.io/ diff --git a/src/plugins/highlightCode.ts b/src/plugins/highlightCode.ts index cc09f98..c141c38 100644 --- a/src/plugins/highlightCode.ts +++ b/src/plugins/highlightCode.ts @@ -1,5 +1,6 @@ import { Plugin } from "../types"; import Prism from "prismjs"; +import "prismjs/components/prism-typescript"; export function highLightPlugin(): Plugin { return { diff --git a/src/shim.d.ts b/src/shim.d.ts new file mode 100644 index 0000000..8534de5 --- /dev/null +++ b/src/shim.d.ts @@ -0,0 +1 @@ +declare module "prismjs/components/*";