Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true

[*.js]
indent_size = 2
indent_style = space

[*.yaml]
indent_size = 2
indent_style = space
Expand Down
10 changes: 7 additions & 3 deletions js/interactive-examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class PHP {
async function main() {
let lastOutput = null;

document.querySelectorAll(".example .example-contents").forEach((example) => {
document.querySelectorAll(".example .example-contents, .informalexample .example-contents").forEach((example) => {
const button = document.createElement("button");
button.setAttribute("type", "button");
const phpcode = example.querySelector(".phpcode.annotation-interactive");
Expand All @@ -72,10 +72,14 @@ async function main() {
let exampleTitleParagraphElement = null;
let exampleScreenPreElement = null;
if (exampleTitleContainer !== null) {
exampleTitleParagraphElement = exampleTitleContainer.querySelector("p")
if (exampleTitleContainer.tagName === "P") {
exampleTitleParagraphElement = exampleTitleContainer;
} else {
exampleTitleParagraphElement = exampleTitleContainer.querySelector("p")
}
const exampleScreenContainer = exampleTitleContainer.nextElementSibling;
if (exampleScreenContainer !== null) {
exampleScreenPreElement = exampleScreenContainer.querySelector("pre");
exampleScreenPreElement = exampleScreenContainer.querySelector("pre");
}
}

Expand Down