Skip to content

Commit

Permalink
Merge pull request #50 from opensquare-network/feat/ts-highlight
Browse files Browse the repository at this point in the history
feat: typescript highlight
  • Loading branch information
YoshiyukiSakura authored Aug 15, 2022
2 parents 167f71b + 187da5c commit df96be4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions demo/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
1 change: 1 addition & 0 deletions src/plugins/highlightCode.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Plugin } from "../types";
import Prism from "prismjs";
import "prismjs/components/prism-typescript";

export function highLightPlugin(): Plugin {
return {
Expand Down
1 change: 1 addition & 0 deletions src/shim.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module "prismjs/components/*";

0 comments on commit df96be4

Please sign in to comment.