Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and WebReflection committed Apr 11, 2024
1 parent 2fcd85a commit f103183
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pyscript.core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyscript.core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pyscript/core",
"version": "0.4.18",
"version": "0.4.20",
"type": "module",
"description": "PyScript",
"module": "./index.js",
Expand Down
11 changes: 7 additions & 4 deletions pyscript.core/src/plugins/py-terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,15 @@ const pyTerminal = async (element) => {
// MicroPython and Pyodide
for (const line of code.split(/(?:\r|\n|\r\n)/)) {
terminal.paste(`${line}\n`);
do { await new Promise(resolve => setTimeout(resolve, 0)); }
while (!readline.instance.activeRead?.resolve);
readline.instance.activeRead.resolve(line);
do {
await new Promise((resolve) =>
setTimeout(resolve, 0),
);
} while (!readline.activeRead?.resolve);
readline.activeRead.resolve(line);
}
},
}
},
});
return terminal;
};
Expand Down

0 comments on commit f103183

Please sign in to comment.