Skip to content

Commit

Permalink
Merge pull request #2364 from wilzbach/runnable-example
Browse files Browse the repository at this point in the history
Remove old & invalid msie < 9 support code
merged-on-behalf-of: Vladimir Panteleev <github@thecybershadow.net>
  • Loading branch information
dlang-bot committed May 8, 2018
2 parents e9b5041 + 93be58c commit 6afeb37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
4 changes: 3 additions & 1 deletion dlang.org.ddoc
Expand Up @@ -386,7 +386,9 @@ _=
RELATIVE_LINK2=$(ALOCAL $1, $+)
_=

RUNNABLE_EXAMPLE=$(DIVC runnable-examples, $1)
RUNNABLE_EXAMPLE=<div class="runnable-examples">
$1
</div>
RUNNABLE_EXAMPLE_STDIN=<code class="runnable-examples-stdin">$0</code>
RUNNABLE_EXAMPLE_ARGS=<code class="runnable-examples-args">$0</code>

Expand Down
9 changes: 2 additions & 7 deletions js/run.js
Expand Up @@ -282,18 +282,13 @@ function setupTextarea(el, opts)

var prepareForMain = function()
{
var src = $.browser.msie && $.browser.version < 9.0 ? orgSrc[0].innerText : orgSrc.text();
var src = orgSrc.text();
var arr = src.split("\n");
var str = "";
for ( i = 0; i < arr.length; i++)
for (var i = 0; i < arr.length; i++)
{
str += arr[i]+"\n";
}
if ($.browser.msie && $.browser.version < 9.0)
str = str.substr(0, str.length - 1);
else
str = str.substr(0, str.length - 2);

return str;
};

Expand Down

0 comments on commit 6afeb37

Please sign in to comment.