We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 148f49f commit f3bff93Copy full SHA for f3bff93
1 file changed
tools/doc/preprocess.js
@@ -2,11 +2,11 @@
2
3
module.exports = preprocess;
4
5
-var path = require('path');
6
-var fs = require('fs');
+const path = require('path');
+const fs = require('fs');
7
8
-var includeExpr = /^@include\s+([A-Za-z0-9-_]+)(?:\.)?([a-zA-Z]*)$/gmi;
9
-var includeData = {};
+const includeExpr = /^@include\s+([A-Za-z0-9-_]+)(?:\.)?([a-zA-Z]*)$/gmi;
+const includeData = {};
10
11
function preprocess(inputFile, input, cb) {
12
input = stripComments(input);
@@ -22,7 +22,7 @@ function stripComments(input) {
22
}
23
24
function processIncludes(inputFile, input, cb) {
25
- var includes = input.match(includeExpr);
+ const includes = input.match(includeExpr);
26
if (includes === null) return cb(null, input);
27
var errState = null;
28
console.error(includes);
@@ -40,7 +40,7 @@ function processIncludes(inputFile, input, cb) {
40
41
42
43
- var fullFname = path.resolve(path.dirname(inputFile), fname);
+ const fullFname = path.resolve(path.dirname(inputFile), fname);
44
fs.readFile(fullFname, 'utf8', function(er, inc) {
45
if (errState) return;
46
if (er) return cb(errState = er);
0 commit comments