Skip to content

Commit

Permalink
Update tldr-lint.js
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiaanspeck authored Sep 29, 2024
1 parent 7bd452f commit aadc03f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/tldr-lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const parser = require('./tldr-parser.js').parser;
const util = require('util');

const MAX_EXAMPLES = 8;
const INVALID_WINDOWS_CHARACTERS = /[<>:"/\\|?*]/;

module.exports.ERRORS = parser.ERRORS = {
'TLDR001': 'File should contain no leading whitespace',
Expand Down Expand Up @@ -214,7 +213,7 @@ linter.processFile = function(file, verbose, alsoFormat, ignoreErrors) {
result.errors.push({ locinfo: { first_line: '0' }, code: 'TLDR109', description: this.ERRORS.TLDR109 });
}

if (INVALID_WINDOWS_CHARACTERS.test(path.basename(file))) {
if (/[<>:"/\\|?*]/.test(path.basename(file))) {
result.errors.push({ locinfo: { first_line: '0' }, code: 'TLDR111', description: this.ERRORS.TLDR111 });
}

Expand Down

0 comments on commit aadc03f

Please sign in to comment.