Changeset e29cc2e for trip-planner-front/node_modules/postcss-svgo/dist
- Timestamp:
- 11/25/21 22:08:24 (3 years ago)
- Branches:
- master
- Children:
- 8d391a1
- Parents:
- 59329aa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/node_modules/postcss-svgo/dist/index.js
r59329aa re29cc2e 16 16 const PLUGIN = 'postcss-svgo'; 17 17 const dataURI = /data:image\/svg\+xml(;((charset=)?utf-8|base64))?,/i; 18 const dataURIBase64 = /data:image\/svg\+xml;base64,/i; 18 const dataURIBase64 = /data:image\/svg\+xml;base64,/i; // the following regex will globally match: 19 // \b([\w-]+) --> a word (a sequence of one or more [alphanumeric|underscore|dash] characters; followed by 20 // \s*=\s* --> an equal sign character (=) between optional whitespaces; followed by 21 // \\"([\S\s]+?)\\" --> any characters (including whitespaces and newlines) between literal escaped quotes (\") 22 23 const escapedQuotes = /\b([\w-]+)\s*=\s*\\"([\S\s]+?)\\"/g; 19 24 /** 20 25 * @param {string} input the SVG string … … 41 46 if (opts.encode !== undefined) { 42 47 isUriEncoded = opts.encode; 43 } 48 } // normalize all escaped quote characters from svg attributes 49 // from <svg attr=\"value\"... /> to <svg attr="value"... /> 50 // see: https://github.com/cssnano/cssnano/issues/1194 44 51 52 53 svg = svg.replace(escapedQuotes, '$1="$2"'); 45 54 const result = (0, _svgo.optimize)(svg, opts); 46 55
Note:
See TracChangeset
for help on using the changeset viewer.