We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 36e1f01 + cf1557e commit 59bd5dbCopy full SHA for 59bd5db
src/theme/book.js
@@ -4,12 +4,14 @@
4
window.onunload = function () { };
5
6
// Global variable, shared between modules
7
-function playground_text(playground) {
+function playground_text(playground, hidden = true) {
8
let code_block = playground.querySelector("code");
9
10
if (window.ace && code_block.classList.contains("editable")) {
11
let editor = window.ace.edit(code_block);
12
return editor.getValue();
13
+ } else if (hidden) {
14
+ return code_block.textContent;
15
} else {
16
return code_block.innerText;
17
}
@@ -599,7 +601,7 @@ function playground_text(playground) {
599
601
text: function (trigger) {
600
602
hideTooltip(trigger);
603
let playground = trigger.closest("pre");
- return playground_text(playground);
604
+ return playground_text(playground, false);
605
606
});
607
0 commit comments