Skip to content

Commit f3bff93

Browse files
BridgeARaddaleax
authored andcommitted
tools: change var to const in ./doc/preprocess
PR-URL: #13732 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
1 parent 148f49f commit f3bff93

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tools/doc/preprocess.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
module.exports = preprocess;
44

5-
var path = require('path');
6-
var fs = require('fs');
5+
const path = require('path');
6+
const fs = require('fs');
77

8-
var includeExpr = /^@include\s+([A-Za-z0-9-_]+)(?:\.)?([a-zA-Z]*)$/gmi;
9-
var includeData = {};
8+
const includeExpr = /^@include\s+([A-Za-z0-9-_]+)(?:\.)?([a-zA-Z]*)$/gmi;
9+
const includeData = {};
1010

1111
function preprocess(inputFile, input, cb) {
1212
input = stripComments(input);
@@ -22,7 +22,7 @@ function stripComments(input) {
2222
}
2323

2424
function processIncludes(inputFile, input, cb) {
25-
var includes = input.match(includeExpr);
25+
const includes = input.match(includeExpr);
2626
if (includes === null) return cb(null, input);
2727
var errState = null;
2828
console.error(includes);
@@ -40,7 +40,7 @@ function processIncludes(inputFile, input, cb) {
4040
}
4141
}
4242

43-
var fullFname = path.resolve(path.dirname(inputFile), fname);
43+
const fullFname = path.resolve(path.dirname(inputFile), fname);
4444
fs.readFile(fullFname, 'utf8', function(er, inc) {
4545
if (errState) return;
4646
if (er) return cb(errState = er);

0 commit comments

Comments
 (0)