Skip to content

Commit d82ab8b

Browse files
committed
Run.js: make the output a pre area (-> allows auto-expand)
1 parent 81d4acb commit d82ab8b

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

css/style.css

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,7 +1610,7 @@ div.changelog-nav
16101610

16111611
/* Runnable-examples css */
16121612
textarea.d_code {display: none;}
1613-
textarea.d_code_output, textarea.d_code_stdin, textarea.d_code_args
1613+
textarea.d_code_stdin, textarea.d_code_args
16141614
{
16151615
text-align: left;
16161616
border: none;
@@ -1624,6 +1624,11 @@ textarea.d_code_output, textarea.d_code_stdin, textarea.d_code_args
16241624
outline: none;
16251625
}
16261626

1627+
pre.d_code_output {
1628+
border: none;
1629+
max-height: 30em;
1630+
}
1631+
16271632
div.d_code {margin: 0; padding: 0; background: #F5F5F5;}
16281633
div.d_run_code {display: none;}
16291634
div.d_code_output, div.d_code_stdin, div.d_code_args, div.d_code_unittest
@@ -1681,6 +1686,11 @@ input.editButton:active
16811686
position: relative; top: 1px;
16821687
}
16831688
input.resetButton{display: none}
1689+
1690+
/* Style for the example run buttons on the Phobos library documentation */
1691+
.d_example_buttons {
1692+
text-align: left;
1693+
}
16841694
/* Runnable-examples css -end */
16851695

16861696
.page-contents
@@ -2113,8 +2123,3 @@ dt.d_decl:hover .decl_anchor {
21132123
text-decoration: none;
21142124
color: #333;
21152125
}
2116-
2117-
/* Style for the example run buttons on the Phobos library documentation */
2118-
.d_example_buttons {
2119-
text-align: left;
2120-
}

js/run_examples.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ $(document).ready(function()
8282
+ '<div class="d_run_code" style="display: block">'
8383
+ '<textarea class="d_code" style="display: none;"></textarea>'
8484
+ '</div>'
85-
+ '<div class="d_code_output"><span class="d_code_title">Application output</span><br><textarea class="d_code_output" readonly>Running...</textarea>'
85+
+ '<div class="d_code_output"><span class="d_code_title">Application output</span><br><pre class="d_code_output" readonly>Running...</pre>'
8686
+ '</div>'
8787
);
8888
});

0 commit comments

Comments
 (0)