Skip to content

Commit 0f8f6bd

Browse files
committed
fixing bug in auto-indent
1 parent 99009a3 commit 0f8f6bd

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

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

+1-7
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,6 @@ const PyodideRunner = (props) => {
9090
setIndentationLevel((prevIndentationLevel) => prevIndentationLevel + 1);
9191
};
9292

93-
const decrementIndentationLevel = () => {
94-
setIndentationLevel((prevIndentationLevel) => {
95-
return Math.max(0, prevIndentationLevel - 1);
96-
});
97-
};
98-
9993
useEffect(() => {
10094
console.log("indentationLevel", indentationLevel);
10195
}, [indentationLevel]);
@@ -253,7 +247,7 @@ const PyodideRunner = (props) => {
253247
} else if (content.trimEnd() === "") {
254248
console.log("the content is");
255249
console.log(content);
256-
decrementIndentationLevel();
250+
setIndentationLevel(0);
257251
}
258252

259253
const encoder = new TextEncoder();

0 commit comments

Comments
 (0)