From 92e322e41458ff0cfb948fd13452937526ef8af2 Mon Sep 17 00:00:00 2001 From: dpilafian Date: Sun, 24 Dec 2023 01:34:11 -0800 Subject: [PATCH] Release v1.6.2 --- README.md | 4 ++-- dist/w3c-html-validator.d.ts | 2 +- dist/w3c-html-validator.js | 8 ++++---- package.json | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index de83c5e..b1a9d95 100644 --- a/README.md +++ b/README.md @@ -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`
- 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`
Suppresses all the "pass" status messages. @@ -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.  HTML validation messages containing any of the strings or matching any of the regexes will be skipped.  Empty lines and lines starting with a hash sign (`#`) are treated as comments and do nothing. diff --git a/dist/w3c-html-validator.d.ts b/dist/w3c-html-validator.d.ts index 9674bba..62c9a1a 100644 --- a/dist/w3c-html-validator.d.ts +++ b/dist/w3c-html-validator.d.ts @@ -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; diff --git a/dist/w3c-html-validator.js b/dist/w3c-html-validator.js index d344e0e..a8a4f4e 100644 --- a/dist/w3c-html-validator.js +++ b/dist/w3c-html-validator.js @@ -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 import chalk from 'chalk'; import fs from 'fs'; @@ -6,7 +6,7 @@ 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/', @@ -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); }, diff --git a/package.json b/package.json index d16cafe..0f191f5 100644 --- a/package.json +++ b/package.json @@ -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",