Marimeireles fix/#1081 (#1155)

* Improves repl id output

* Fix tests for new REPL output ids

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add new REPL tests

* Pre commit linting

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Remove mistake

* Fixing tests that i didn't notice were broken?

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Mariana Meireles
2023-02-14 07:51:43 +01:00
committed by GitHub
parent 1f825edc28
commit b14a2bba5f
3 changed files with 58 additions and 8 deletions

View File

@@ -43,7 +43,7 @@ export function make_PyRepl(interpreter: Interpreter) {
this.shadow.appendChild(slot);
if (!this.hasAttribute('exec-id')) {
this.setAttribute('exec-id', '1');
this.setAttribute('exec-id', '0');
}
if (!this.hasAttribute('root')) {
this.setAttribute('root', this.id);
@@ -141,7 +141,7 @@ export function make_PyRepl(interpreter: Interpreter) {
makeOutDiv(): HTMLElement {
const outDiv = document.createElement('div');
outDiv.className = 'py-repl-output';
outDiv.id = this.id + '-' + this.getAttribute('exec-id');
outDiv.id = this.id + '-repl-output';
return outDiv;
}