Skip to content

Commit 6afeb37

Browse files
authored
Merge pull request #2364 from wilzbach/runnable-example
Remove old & invalid msie < 9 support code merged-on-behalf-of: Vladimir Panteleev <github@thecybershadow.net>
2 parents e9b5041 + 93be58c commit 6afeb37

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

dlang.org.ddoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,9 @@ _=
386386
RELATIVE_LINK2=$(ALOCAL $1, $+)
387387
_=
388388

389-
RUNNABLE_EXAMPLE=$(DIVC runnable-examples, $1)
389+
RUNNABLE_EXAMPLE=<div class="runnable-examples">
390+
$1
391+
</div>
390392
RUNNABLE_EXAMPLE_STDIN=<code class="runnable-examples-stdin">$0</code>
391393
RUNNABLE_EXAMPLE_ARGS=<code class="runnable-examples-args">$0</code>
392394

js/run.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -282,18 +282,13 @@ function setupTextarea(el, opts)
282282

283283
var prepareForMain = function()
284284
{
285-
var src = $.browser.msie && $.browser.version < 9.0 ? orgSrc[0].innerText : orgSrc.text();
285+
var src = orgSrc.text();
286286
var arr = src.split("\n");
287287
var str = "";
288-
for ( i = 0; i < arr.length; i++)
288+
for (var i = 0; i < arr.length; i++)
289289
{
290290
str += arr[i]+"\n";
291291
}
292-
if ($.browser.msie && $.browser.version < 9.0)
293-
str = str.substr(0, str.length - 1);
294-
else
295-
str = str.substr(0, str.length - 2);
296-
297292
return str;
298293
};
299294

0 commit comments

Comments
 (0)