File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 44window . onunload = function ( ) { } ;
55
66// Global variable, shared between modules
7- function playground_text ( playground ) {
7+ function playground_text ( playground , hidden = true ) {
88 let code_block = playground . querySelector ( "code" ) ;
99
1010 if ( window . ace && code_block . classList . contains ( "editable" ) ) {
1111 let editor = window . ace . edit ( code_block ) ;
1212 return editor . getValue ( ) ;
13- } else {
14- return code_block . textContent ;
13+ } else if ( hidden ) {
14+ code_block . textContent ;
15+ } else {
16+ return code_block . innerText ;
1517 }
1618}
1719
@@ -592,7 +594,7 @@ function playground_text(playground) {
592594 text : function ( trigger ) {
593595 hideTooltip ( trigger ) ;
594596 let playground = trigger . closest ( "pre" ) ;
595- return playground_text ( playground ) ;
597+ return playground_text ( playground , false ) ;
596598 }
597599 } ) ;
598600
You can’t perform that action at this time.
0 commit comments