From 9263d9ab90aff0283e036e92cbb609e63b8ac135 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Wed, 24 Feb 2021 11:18:48 +0300 Subject: [PATCH] Fix svg spec urls in plugins --- plugins/_path.js | 2 +- plugins/cleanupEnableBackground.js | 2 +- plugins/convertColors.js | 4 ++-- plugins/convertEllipseToCircle.js | 2 +- plugins/convertPathData.js | 2 +- plugins/convertShapeToPath.js | 2 +- plugins/convertTransform.js | 2 +- plugins/removeEmptyContainers.js | 2 +- plugins/removeEmptyText.js | 2 +- plugins/removeHiddenElems.js | 28 ++++++++++++++-------------- plugins/removeMetadata.js | 2 +- plugins/removeScriptElement.js | 2 +- plugins/removeStyleElement.js | 2 +- plugins/removeViewBox.js | 2 +- 14 files changed, 28 insertions(+), 28 deletions(-) diff --git a/plugins/_path.js b/plugins/_path.js index 0af411b7d..684706917 100644 --- a/plugins/_path.js +++ b/plugins/_path.js @@ -75,7 +75,7 @@ exports.path2js = function(path) { data = data.map(Number); // Subsequent moveto pairs of coordinates are threated as implicit lineto commands - // http://www.w3.org/TR/SVG/paths.html#PathDataMovetoCommands + // http://www.w3.org/TR/SVG11/paths.html#PathDataMovetoCommands if (instruction == 'M' || instruction == 'm') { pathData.push({ instruction: pathData.length == 0 ? 'M' : instruction, diff --git a/plugins/cleanupEnableBackground.js b/plugins/cleanupEnableBackground.js index dddd7a79d..5ceb9517f 100644 --- a/plugins/cleanupEnableBackground.js +++ b/plugins/cleanupEnableBackground.js @@ -9,7 +9,7 @@ exports.description = 'remove or cleanup enable-background attribute when possib /** * Remove or cleanup enable-background attr which coincides with a width/height box. * - * @see http://www.w3.org/TR/SVG/filters.html#EnableBackgroundProperty + * @see http://www.w3.org/TR/SVG11/filters.html#EnableBackgroundProperty * * @example * diff --git a/plugins/convertColors.js b/plugins/convertColors.js index bd9a03a69..12f4ac11e 100644 --- a/plugins/convertColors.js +++ b/plugins/convertColors.js @@ -24,8 +24,8 @@ var collections = require('./_collections'), /** * Convert different colors formats in element attributes to hex. * - * @see http://www.w3.org/TR/SVG/types.html#DataTypeColor - * @see http://www.w3.org/TR/SVG/single-page.html#types-ColorKeywords + * @see http://www.w3.org/TR/SVG11/types.html#DataTypeColor + * @see http://www.w3.org/TR/SVG11/single-page.html#types-ColorKeywords * * @example * Convert color name keyword to long hex: diff --git a/plugins/convertEllipseToCircle.js b/plugins/convertEllipseToCircle.js index d22c629f9..9d4d93965 100644 --- a/plugins/convertEllipseToCircle.js +++ b/plugins/convertEllipseToCircle.js @@ -9,7 +9,7 @@ exports.description = 'converts non-eccentric s to s'; /** * Converts non-eccentric s to s. * - * @see http://www.w3.org/TR/SVG/shapes.html + * @see http://www.w3.org/TR/SVG11/shapes.html * * @param {Object} item current iteration item * @return {Boolean} if false, item will be filtered out diff --git a/plugins/convertPathData.js b/plugins/convertPathData.js index 6aad595ce..3b7bf4f58 100644 --- a/plugins/convertPathData.js +++ b/plugins/convertPathData.js @@ -48,7 +48,7 @@ var pathElems = require('./_collections.js').pathElems, * trim useless delimiters and leading zeros, * decrease accuracy of floating-point numbers. * - * @see http://www.w3.org/TR/SVG/paths.html#PathData + * @see http://www.w3.org/TR/SVG11/paths.html#PathData * * @param {Object} item current iteration item * @param {Object} params plugin params diff --git a/plugins/convertShapeToPath.js b/plugins/convertShapeToPath.js index 907246145..2330e41e1 100644 --- a/plugins/convertShapeToPath.js +++ b/plugins/convertShapeToPath.js @@ -18,7 +18,7 @@ var none = { value: 0 }, * It also allows further optimizations like * combining paths with similar attributes. * - * @see http://www.w3.org/TR/SVG/shapes.html + * @see http://www.w3.org/TR/SVG11/shapes.html * * @param {Object} item current iteration item * @param {Object} params plugin params diff --git a/plugins/convertTransform.js b/plugins/convertTransform.js index efeb180d0..61cdabf4b 100644 --- a/plugins/convertTransform.js +++ b/plugins/convertTransform.js @@ -35,7 +35,7 @@ var cleanupOutData = require('../lib/svgo/tools').cleanupOutData, * convert transforms to the matrices and multiply them all into one, * remove useless transforms. * - * @see http://www.w3.org/TR/SVG/coords.html#TransformMatrixDefined + * @see http://www.w3.org/TR/SVG11/coords.html#TransformMatrixDefined * * @param {Object} item current iteration item * @param {Object} params plugin params diff --git a/plugins/removeEmptyContainers.js b/plugins/removeEmptyContainers.js index 6ef1aac33..e73ccf7d3 100644 --- a/plugins/removeEmptyContainers.js +++ b/plugins/removeEmptyContainers.js @@ -11,7 +11,7 @@ var container = require('./_collections').elemsGroups.container; /** * Remove empty containers. * - * @see http://www.w3.org/TR/SVG/intro.html#TermContainerElement + * @see http://www.w3.org/TR/SVG11/intro.html#TermContainerElement * * @example * diff --git a/plugins/removeEmptyText.js b/plugins/removeEmptyText.js index 049b18196..d2a09d01f 100644 --- a/plugins/removeEmptyText.js +++ b/plugins/removeEmptyText.js @@ -15,7 +15,7 @@ exports.params = { /** * Remove empty Text elements. * - * @see http://www.w3.org/TR/SVG/text.html + * @see http://www.w3.org/TR/SVG11/text.html * * @example * Remove empty text element: diff --git a/plugins/removeHiddenElems.js b/plugins/removeHiddenElems.js index 7379125e7..cc8135e94 100644 --- a/plugins/removeHiddenElems.js +++ b/plugins/removeHiddenElems.js @@ -57,7 +57,7 @@ exports.fn = function (item, params) { // display="none" // - // http://www.w3.org/TR/SVG/painting.html#DisplayProperty + // http://www.w3.org/TR/SVG11/painting.html#DisplayProperty // "A value of display: none indicates that the given element // and its children shall not be rendered directly" if ( @@ -67,7 +67,7 @@ exports.fn = function (item, params) { // opacity="0" // - // http://www.w3.org/TR/SVG/masking.html#ObjectAndGroupOpacityProperties + // http://www.w3.org/TR/SVG11/masking.html#ObjectAndGroupOpacityProperties if ( params.opacity0 && item.hasAttr('opacity', '0') @@ -75,7 +75,7 @@ exports.fn = function (item, params) { // Circles with zero radius // - // http://www.w3.org/TR/SVG/shapes.html#CircleElementRAttribute + // http://www.w3.org/TR/SVG11/shapes.html#CircleElementRAttribute // "A value of zero disables rendering of the element" // // @@ -88,7 +88,7 @@ exports.fn = function (item, params) { // Ellipse with zero x-axis radius // - // http://www.w3.org/TR/SVG/shapes.html#EllipseElementRXAttribute + // http://www.w3.org/TR/SVG11/shapes.html#EllipseElementRXAttribute // "A value of zero disables rendering of the element" // // @@ -101,7 +101,7 @@ exports.fn = function (item, params) { // Ellipse with zero y-axis radius // - // http://www.w3.org/TR/SVG/shapes.html#EllipseElementRYAttribute + // http://www.w3.org/TR/SVG11/shapes.html#EllipseElementRYAttribute // "A value of zero disables rendering of the element" // // @@ -114,7 +114,7 @@ exports.fn = function (item, params) { // Rectangle with zero width // - // http://www.w3.org/TR/SVG/shapes.html#RectElementWidthAttribute + // http://www.w3.org/TR/SVG11/shapes.html#RectElementWidthAttribute // "A value of zero disables rendering of the element" // // @@ -127,7 +127,7 @@ exports.fn = function (item, params) { // Rectangle with zero height // - // http://www.w3.org/TR/SVG/shapes.html#RectElementHeightAttribute + // http://www.w3.org/TR/SVG11/shapes.html#RectElementHeightAttribute // "A value of zero disables rendering of the element" // // @@ -141,7 +141,7 @@ exports.fn = function (item, params) { // Pattern with zero width // - // http://www.w3.org/TR/SVG/pservers.html#PatternElementWidthAttribute + // http://www.w3.org/TR/SVG11/pservers.html#PatternElementWidthAttribute // "A value of zero disables rendering of the element (i.e., no paint is applied)" // // @@ -153,7 +153,7 @@ exports.fn = function (item, params) { // Pattern with zero height // - // http://www.w3.org/TR/SVG/pservers.html#PatternElementHeightAttribute + // http://www.w3.org/TR/SVG11/pservers.html#PatternElementHeightAttribute // "A value of zero disables rendering of the element (i.e., no paint is applied)" // // @@ -165,7 +165,7 @@ exports.fn = function (item, params) { // Image with zero width // - // http://www.w3.org/TR/SVG/struct.html#ImageElementWidthAttribute + // http://www.w3.org/TR/SVG11/struct.html#ImageElementWidthAttribute // "A value of zero disables rendering of the element" // // @@ -177,7 +177,7 @@ exports.fn = function (item, params) { // Image with zero height // - // http://www.w3.org/TR/SVG/struct.html#ImageElementHeightAttribute + // http://www.w3.org/TR/SVG11/struct.html#ImageElementHeightAttribute // "A value of zero disables rendering of the element" // // @@ -189,7 +189,7 @@ exports.fn = function (item, params) { // Path with empty data // - // http://www.w3.org/TR/SVG/paths.html#DAttribute + // http://www.w3.org/TR/SVG11/paths.html#DAttribute // // if ( @@ -200,7 +200,7 @@ exports.fn = function (item, params) { // Polyline with empty points // - // http://www.w3.org/TR/SVG/shapes.html#PolylineElementPointsAttribute + // http://www.w3.org/TR/SVG11/shapes.html#PolylineElementPointsAttribute // // if ( @@ -211,7 +211,7 @@ exports.fn = function (item, params) { // Polygon with empty points // - // http://www.w3.org/TR/SVG/shapes.html#PolygonElementPointsAttribute + // http://www.w3.org/TR/SVG11/shapes.html#PolygonElementPointsAttribute // // if ( diff --git a/plugins/removeMetadata.js b/plugins/removeMetadata.js index fa7a57951..116aaf17f 100644 --- a/plugins/removeMetadata.js +++ b/plugins/removeMetadata.js @@ -9,7 +9,7 @@ exports.description = 'removes '; /** * Remove . * - * http://www.w3.org/TR/SVG/metadata.html + * http://www.w3.org/TR/SVG11/metadata.html * * @param {Object} item current iteration item * @return {Boolean} if false, item will be filtered out diff --git a/plugins/removeScriptElement.js b/plugins/removeScriptElement.js index f80410bd4..ac90b9b84 100644 --- a/plugins/removeScriptElement.js +++ b/plugins/removeScriptElement.js @@ -9,7 +9,7 @@ exports.description = 'removes