Skip to content

Commit 99009a3

Browse files
committed
attempt at syntax highlighting that didn't work
1 parent 7e27828 commit 99009a3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/components/Editor/Runners/PythonRunner/PyodideRunner/PyodideRunner.jsx

+6
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ import VisualOutputPane from "./VisualOutputPane";
1818
import OutputViewToggle from "../OutputViewToggle";
1919
import { SettingsContext } from "../../../../../utils/settings";
2020
import RunnerControls from "../../../../RunButton/RunnerControls";
21+
// import "prismjs/plugins/highlight-keywords/prism-highlight-keywords.js";
22+
// import Prism from "prismjs";
23+
24+
// window.Prism = Prism;
2125

2226
const getWorkerURL = (url) => {
2327
const content = `
@@ -111,6 +115,7 @@ const PyodideRunner = (props) => {
111115
setInputStackIndex(inputStackIndex - 1);
112116
}
113117
}
118+
// window.Prism.highlightElement(event.target);
114119
};
115120
if (consoleMode) {
116121
const inputElement = getInputElement();
@@ -122,6 +127,7 @@ const PyodideRunner = (props) => {
122127
useEffect(() => {
123128
if (awaitingInput && consoleMode) {
124129
const inputElement = getInputElement();
130+
// inputElement.classList.add("language-python");
125131
inputElement.innerText = " ".repeat(indentationLevel * 4);
126132
// move cursor to end of text
127133
const range = document.createRange();

0 commit comments

Comments
 (0)