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 52a6ec6 commit 02568e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/tldr-lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const parser = require('./tldr-parser.js').parser;
const util = require('util');

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

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

if (ILLEGAL_WINDOWS_CHARACTERS.test(path.basename(file))) {
if (INVALID_WINDOWS_CHARACTERS.test(path.basename(file))) {
result.errors.push({ locinfo: { first_line: '0' }, code: 'TLDR111', description: this.ERRORS.TLDR111 });
}

Expand Down

0 comments on commit 02568e8

Please sign in to comment.