Skip to content

Commit 27435ba

Browse files
committed
Fix id collision between commands placeholder and section heading
Zola auto-generates id="available-commands" on the "Available commands" <h2>. The placeholder <p> shared that id, so getElementById matched the heading first and the populate-from-WASM_COMMANDS script ended up overwriting the heading text — rendering the command list at h2 size. Rename the placeholder to a non-colliding id.
1 parent bf07dc3 commit 27435ba

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

content/playground.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ template = "page.html"
3737
}
3838
// Populate the "Available commands" list from the build-generated list
3939
if (typeof WASM_COMMANDS !== "undefined" && Array.isArray(WASM_COMMANDS)) {
40-
var listEl = document.getElementById("available-commands");
40+
var listEl = document.getElementById("wasm-commands-list");
4141
if (listEl) {
4242
listEl.innerHTML = WASM_COMMANDS.slice().sort().map(function(c) {
4343
return "<code>" + c + "</code>";
@@ -113,7 +113,7 @@ Multiple commands can be separated by newlines (`%0A` in the URL):
113113

114114
The following commands run as **real Rust coreutils compiled to WebAssembly**:
115115

116-
<p id="available-commands">Loading the list of available commands…</p>
116+
<p id="wasm-commands-list">Loading the list of available commands…</p>
117117

118118
The following are **shell builtins** implemented in JavaScript:
119119

0 commit comments

Comments
 (0)