Skip to content

Commit 4326e16

Browse files
committed
Python highlighting
1 parent fa2f351 commit 4326e16

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

project-words.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ numpy
3535
peaceiris
3636
pipeable
3737
posix
38+
prismjs
3839
prosgegrammeni
3940
randcolor
4041
rehype

src/App.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ import { Route, Routes } from "react-router-dom";
77
import Layout from "./Layout";
88

99
import "./global.css";
10+
import { Prism } from "prism-react-renderer";
11+
12+
globalThis.Prism = Prism;
13+
await import("prismjs/components/prism-python");
1014

1115
export default function App(): JSX.Element {
1216
return (

vite-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/// <reference types="vite-plugin-svgr/client" />
44

55
declare module "bash-parser";
6+
declare module "prismjs/components/prism-*";
67

78
declare interface Set<T> {
89
difference(otherSet: Set<T>): Set<T>;

0 commit comments

Comments
 (0)