Skip to content

Commit 97e5cb9

Browse files
committed
fix bad regexp in JSHint test; make plugins JSHint-clean
1 parent 7dff20d commit 97e5cb9

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

plugins/prettyPrintSource.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
/*global env: true */
12
/**
2-
* @file Adds pretty printed source code to
3+
* @file Adds pretty printed source code to
34
* the output files.
45
* @author <a href="mailto:[email protected]">Matthew Christopher Kastor-Inare III</a>
56
* Hial Atropa!!
@@ -36,7 +37,7 @@ exports.handlers = {
3637

3738
out = toRelativePath(sourceFileName);
3839
out = slashesCollapseToDots(out);
39-
out = noDotPrefix(out)
40+
out = noDotPrefix(out);
4041
out += extension;
4142

4243
return out;
@@ -81,7 +82,7 @@ exports.handlers = {
8182
outsource += sourceContent;
8283
outsource += ' </pre>\n';
8384
outsource += ' <script>prettyPrint();</script>\n';
84-
outsource += ' </body>\n'
85+
outsource += ' </body>\n';
8586
outsource += '</html>\n';
8687

8788
fs.mkPath(outDir);
@@ -96,7 +97,7 @@ exports.handlers = {
9697
var outDir = getOutputDirectory();
9798
var outfile = outDir + outFileName;
9899

99-
/*// Debug
100+
/*// Debug
100101
print('source file name = ' + sourceFileName);
101102
print('output file name = ' + outFileName);
102103
print('output directory = ' + outDir);

plugins/sourcetag.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ exports.handlers = {
3434
throw new Error('@source tag expects a valid JSON value, like { "filename": "myfile.js", "lineno": 123 }.');
3535
}
3636

37-
!e.doclet.meta && (e.doclet.meta = {});
37+
e.doclet.meta = e.doclet.meta || {};
3838
e.doclet.meta.filename = value.filename || '';
3939
e.doclet.meta.lineno = value.lineno || '';
4040
}

test/specs/jshint/jshint-clean.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe("jshint-clean", function() {
4141
// check all .js files unless they're tests; rhino shim files that probably can't be
4242
// delinted; or third-party modules
4343
source = {
44-
includePattern: '.+[\\|/]rhino_modules[\\|/].+\.js$|.+[\\|/]plugins[\\|/]\w+\.js$',
44+
includePattern: '.+[\\|/]rhino_modules[\\|/].+\\.js$|.+[\\|/]plugins[\\|/]\\w+\\.js$',
4545
excludePattern: '.+[\\|/]test[\\|/].+'
4646
};
4747
filter = new (require('jsdoc/src/filter').Filter)(source);

0 commit comments

Comments
 (0)