Commit a8cb58b0 authored by Philipp Nowinski's avatar Philipp Nowinski

[TASK] change url to use https

parent 46923194
......@@ -69,11 +69,18 @@ module.exports = function (_options) {
width = result.SVG.ATTR['viewbox'].toString().replace(/^\d+\s\d+\s(\d+\.?[\d])\s(\d+\.?[\d])/, "$1");
height = result.SVG.ATTR['viewbox'].toString().replace(/^\d+\s\d+\s(\d+\.?[\d])\s(\d+\.?[\d])/, "$2");
}
var iteration = 0;
var inlineSvg = encodeURIComponent(String(file.contents)).replace(new RegExp('(stroke|fill+)%3D%22%23?((?:.(?!%23?\s+(?:\S+)%3D|[%3E%22]))+.)%22?', 'gim'), function(match, p1, p2) {
console.log('p2', p2);
return p1 + '%3D%22%23#{color' + ++iteration + '}%22';
});
// store this svg data
svgs.push({
name: path.basename(file.path, '.svg'),
inline: 'data:image/svg+xml,' + encodeURIComponent(String(file.contents)),
inline: 'data:image/svg+xml,' + inlineSvg,
width: parseInt(width) + 'px',
height: parseInt(height) + 'px'
});
......
{
"name": "gulp-inline-svg",
"version": "1.0.0",
"version": "1.0.1",
"description": "A gulp plugin to use inline SVG as background-images",
"keywords": [
"gulpplugin, gulp, svg, inline"
......@@ -12,7 +12,7 @@
"author": "",
"repository": {
"type": "git",
"url": "http://gitlab.sgalinski.de/toolchain/gulp-inline-svg.git"
"url": "https://gitlab.sgalinski.de/toolchain/gulp-inline-svg.git"
},
"scripts": {
"test": "istanbul test _mocha --report html -- test/*.js --reporter spec",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment