Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup: put long if bodies in a new line
  • Loading branch information
vsemozhetbyt committed Mar 23, 2018
commit bf2efccb9f6d1e07974b760f60877952d4bc38cc
6 changes: 4 additions & 2 deletions tools/doc/preprocess.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const commentExpr = /^@\/\/.*$/gmi;

function processIncludes(inputFile, input, cb) {
const includes = input.match(includeExpr);
if (includes === null) return cb(null, input.replace(commentExpr, ''));
if (includes === null)
return cb(null, input.replace(commentExpr, ''));

let errState = null;
let incCount = includes.length;
Expand All @@ -30,7 +31,8 @@ function processIncludes(inputFile, input, cb) {
`${inc}\n<!-- [end-include:${fname}] -->\n`;
input = input.split(`${include}\n`).join(`${inc}\n`);

if (incCount === 0) return cb(null, input.replace(commentExpr, ''));
if (incCount === 0)
return cb(null, input.replace(commentExpr, ''));
});
});
}