Skip to content

Commit

Permalink
tools: change var to const in ./doc/preprocess
Browse files Browse the repository at this point in the history
PR-URL: #13732
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
  • Loading branch information
BridgeAR authored and addaleax committed Jul 18, 2017
1 parent 148f49f commit f3bff93
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tools/doc/preprocess.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

module.exports = preprocess;

var path = require('path');
var fs = require('fs');
const path = require('path');
const fs = require('fs');

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

function preprocess(inputFile, input, cb) {
input = stripComments(input);
Expand All @@ -22,7 +22,7 @@ function stripComments(input) {
}

function processIncludes(inputFile, input, cb) {
var includes = input.match(includeExpr);
const includes = input.match(includeExpr);
if (includes === null) return cb(null, input);
var errState = null;
console.error(includes);
Expand All @@ -40,7 +40,7 @@ function processIncludes(inputFile, input, cb) {
}
}

var fullFname = path.resolve(path.dirname(inputFile), fname);
const fullFname = path.resolve(path.dirname(inputFile), fname);
fs.readFile(fullFname, 'utf8', function(er, inc) {
if (errState) return;
if (er) return cb(errState = er);
Expand Down

0 comments on commit f3bff93

Please sign in to comment.