diff options
Diffstat (limited to 'js/test.js')
-rwxr-xr-x | js/test.js | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -30,13 +30,13 @@ fs.readFile('spec.txt', 'utf8', function(err, data) { .replace(/^<!-- END TESTS -->(.|[\n])*/m, ''); tests.replace(/^\.\n([\s\S]*?)^\.\n([\s\S]*?)^\.$|^#{1,6} *(.*)$/gm, - function(_,x,y,z){ - if (z) { - current_section = z; + function(_,firstSubmatch,secondSubmatch,thirdSubmatch){ + if (thirdSubmatch) { + current_section = thirdSubmatch; } else { example_number++; - examples.push({markdown: x, - html: y, + examples.push({markdown: firstSubmatch, + html: secondSubmatch, section: current_section, number: example_number}); } |