Merge pull request #140 from arthur-peka/master
Changing some variable names to improve code readability
This commit is contained in:
Коммит
ab254b555e
10
js/test.js
10
js/test.js
|
@ -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});
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче