Skip to content

Commit

Permalink
Release v1.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Dec 24, 2023
1 parent 808aa1b commit 92e322e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Examples:
Uses a regex with "or" operators (`|`) to skip multiple HTML validation messages.

- `html-validator docs --ignore-config=spec/ignore-config.txt`<br>
Similar to the pervious command but strings and regexes are stored in a configuration file (see the _Ignore Configuration File_ section below).
Similar to the pervious command but strings and regexes are stored in a configuration file (see the _Configuration File for Ignore Patterns_ section below).

- `html-validator --quiet`<br>
Suppresses all the "pass" status messages.
Expand All @@ -91,7 +91,7 @@ Examples:

_**Note:** Single quotes in commands are normalized so they work cross-platform and avoid the errors often encountered on Microsoft Windows._

### 5. Ignore Configuration File
### 5. Configuration File for Ignore Patterns
The optional `--ignore-config=FILENAME` flag specifies a configuration file with one string or regex per line.&nbsp;
HTML validation messages containing any of the strings or matching any of the regexes will be skipped.&nbsp;
Empty lines and lines starting with a hash sign (`#`) are treated as comments and do nothing.
Expand Down
2 changes: 1 addition & 1 deletion dist/w3c-html-validator.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! w3c-html-validator v1.6.1 ~~ https://github.com/center-key/w3c-html-validator ~~ MIT License
//! w3c-html-validator v1.6.2 ~~ https://github.com/center-key/w3c-html-validator ~~ MIT License

export type ValidatorSettings = {
html: string;
Expand Down
8 changes: 4 additions & 4 deletions dist/w3c-html-validator.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//! w3c-html-validator v1.6.1 ~~ https://github.com/center-key/w3c-html-validator ~~ MIT License
//! w3c-html-validator v1.6.2 ~~ https://github.com/center-key/w3c-html-validator ~~ MIT License

import chalk from 'chalk';
import fs from 'fs';
import log from 'fancy-log';
import request from 'superagent';
import slash from 'slash';
const w3cHtmlValidator = {
version: '1.6.1',
version: '1.6.2',
validate(options) {
const defaults = {
checkUrl: 'https://validator.w3.org/nu/',
Expand Down Expand Up @@ -65,8 +65,8 @@ const w3cHtmlValidator = {
const response = reason.response;
const getMsg = () => [response.status, response.res.statusMessage, response.request.url];
const message = response ? getMsg() : [reason.errno, reason.message];
const networkErr = { type: 'network-error', message: message.join(' ') };
return toValidatorResults({ ...response, ...{ body: { messages: [networkErr] } } });
response.body = { messages: [{ type: 'network-error', message: message.join(' ') }] };
return toValidatorResults(response);
};
return w3cRequest.then(filterMessages).then(toValidatorResults).catch(handleError);
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "w3c-html-validator",
"version": "1.6.1",
"version": "1.6.2",
"description": "Check the markup validity of HTML files using the W3C validator",
"license": "MIT",
"type": "module",
Expand Down

0 comments on commit 92e322e

Please sign in to comment.