Skip to content

Commit 7e75b64

Browse files
committed
Support assert to writeln rewrite magic with ddox
1 parent ab5ba6b commit 7e75b64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/run_examples.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// turns asserts into writeln
1010
function reformatExample(code) {
11-
return code.replace(/(<span class="d_keyword">assert<\/span>\((.*)==(.*)\);)+/g, function(match, text, left, right) {
11+
return code.replace(/(<span class="(?:d_keyword|kwd)">assert<\/span>(?:<span class="pun">)?\((.*)==(.*)\);)+/g, function(match, text, left, right) {
1212
return "writeln(" + left.trim() + "); "
1313
+ "<span class='d_comment'>// " + right.trim() + "</span>";
1414
});

0 commit comments

Comments
 (0)