Deployed 055dd076 to dev with MkDocs 1.6.1 and mike 2.1.3

This commit is contained in:
github-actions 2025-07-01 11:11:09 +00:00
parent f1d2a282df
commit c1e31b60b1
5 changed files with 83 additions and 71 deletions

View file

@ -77,7 +77,15 @@ function updateTheme(editor, light, dark) {
});
}
async function setupPyodide(idPrefix, install = null, themeLight = 'tomorrow', themeDark = 'tomorrow_night', session = null) {
async function setupPyodide(
idPrefix,
install = null,
themeLight = 'tomorrow',
themeDark = 'tomorrow_night',
session = null,
minLines = 5,
maxLines = 30,
) {
const editor = ace.edit(idPrefix + "editor");
const run = document.getElementById(idPrefix + "run");
const clear = document.getElementById(idPrefix + "clear");
@ -88,6 +96,12 @@ async function setupPyodide(idPrefix, install = null, themeLight = 'tomorrow', t
editor.session.setMode("ace/mode/python");
setTheme(editor, getTheme(), themeLight, themeDark);
editor.setOption("minLines", minLines);
editor.setOption("maxLines", maxLines);
// Force editor to resize after setting options
editor.resize();
writeOutput(output, "Initializing...");
let pyodide = await pyodidePromise;
if (install && install.length) {