diff options
author | Arthur <arthur.peka@outlook.com> | 2014-09-26 22:40:07 +0300 |
---|---|---|
committer | Arthur <arthur.peka@outlook.com> | 2014-09-26 22:40:07 +0300 |
commit | 3cb8720eb036ba89bb38fa9999393fac267c31da (patch) | |
tree | 72403a157809bb742d311153b6a2739c585bd11a /js | |
parent | 72a381b2a00f3832d8d74dbc9a5faa88fda0450a (diff) |
Changing variable names even for even greater readability
Diffstat (limited to '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(_,firstSubmatch,secondSubmatch,thirdSubmatch){ - if (thirdSubmatch) { - current_section = thirdSubmatch; + function(_,markdownSubmatch,htmlSubmatch,sectionSubmatch){ + if (sectionSubmatch) { + current_section = sectionSubmatch; } else { example_number++; - examples.push({markdown: firstSubmatch, - html: secondSubmatch, + examples.push({markdown: markdownSubmatch, + html: htmlSubmatch, section: current_section, number: example_number}); } |