diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-10-24 20:46:29 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-10-24 20:46:29 -0700 |
commit | ab254b555e02791e8d46cac4d1d8e75682c67671 (patch) | |
tree | f3188769773b7043850627b63d029aa3850c56e1 | |
parent | 7b952201086ac93716b7bb4ca8ac2b61237a033d (diff) | |
parent | 3cb8720eb036ba89bb38fa9999393fac267c31da (diff) |
Merge pull request #140 from arthur-peka/master
Changing some variable names to improve code readability
-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(_,markdownSubmatch,htmlSubmatch,sectionSubmatch){ + if (sectionSubmatch) { + current_section = sectionSubmatch; } else { example_number++; - examples.push({markdown: x, - html: y, + examples.push({markdown: markdownSubmatch, + html: htmlSubmatch, section: current_section, number: example_number}); } |