Skip to content

Commit 2066088

Browse files
committed
Deployed 79e1516 with MkDocs version: 1.6.1
1 parent 6706df4 commit 2066088

28 files changed

Lines changed: 1254 additions & 48 deletions

404.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

assets/_markdown_exec_pyodide.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,9 @@ html[data-theme="dark"] {
4747
.pyodide-clickable {
4848
cursor: pointer;
4949
text-align: right;
50-
}
50+
}
51+
52+
/* For themes other than Material. */
53+
.pyodide .twemoji svg {
54+
width: 1rem;
55+
}

assets/_markdown_exec_pyodide.js

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ function clearOutput(element) {
1616
}
1717

1818
async function evaluatePython(pyodide, editor, output, session) {
19-
pyodide.setStdout({ batched: (string) => { writeOutput(output, string); } });
19+
pyodide.setStdout({ batched: (string) => { writeOutput(output, new Option(string).innerHTML); } });
2020
let result, code = editor.getValue();
2121
clearOutput(output);
2222
try {
2323
result = await pyodide.runPythonAsync(code, { globals: getSession(session, pyodide) });
2424
} catch (error) {
25-
writeOutput(output, error);
25+
writeOutput(output, new Option(error.toString()).innerHTML);
2626
}
27-
if (result) writeOutput(output, result);
27+
if (result) writeOutput(output, new Option(result).innerHTML);
2828
hljs.highlightElement(output);
2929
}
3030

@@ -91,11 +91,19 @@ async function setupPyodide(idPrefix, install = null, themeLight = 'tomorrow', t
9191
writeOutput(output, "Initializing...");
9292
let pyodide = await pyodidePromise;
9393
if (install && install.length) {
94-
micropip = pyodide.pyimport("micropip");
95-
for (const package of install)
96-
await micropip.install(package);
94+
try {
95+
micropip = pyodide.pyimport("micropip");
96+
for (const package of install)
97+
await micropip.install(package);
98+
clearOutput(output);
99+
} catch (error) {
100+
clearOutput(output);
101+
writeOutput(output, `Could not install one or more packages: ${install.join(", ")}\n`);
102+
writeOutput(output, new Option(error.toString()).innerHTML);
103+
}
104+
} else {
105+
clearOutput(output);
97106
}
98-
clearOutput(output);
99107
run.onclick = () => evaluatePython(pyodide, editor, output, session);
100108
clear.onclick = () => clearOutput(output);
101109
output.parentElement.parentElement.addEventListener("keydown", (event) => {

assets/javascripts/bundle.5a789024.min.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

assets/javascripts/bundle.eb438620.min.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/javascripts/workers/search.c7c1ca2c.min.js renamed to assets/javascripts/workers/search.ad38c271.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/stylesheets/main.8cce3a28.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/stylesheets/main.f15084e1.min.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

changelog/index.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

code_of_conduct/index.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)