mirror of
https://github.com/Mibew/simple-icons.git
synced 2025-05-02 09:06:43 +03:00
Fix SVG linting errors (#7551)
* Remove newlines * Remove newline to fix test * Enforce `lf` line endings * Remove trailing newline enforcement * Remove `replace` to ensure no trailing newlines * Revert "Enforce `lf` line endings" This reverts commit 05a13db8c33cc0dbe78318e00ff51b6412f58094.
This commit is contained in:
parent
4c6c4bd3b8
commit
84c0149bba
@ -25,7 +25,7 @@ const htmlNamedEntities = JSON.parse(
|
|||||||
const svglintIgnores = JSON.parse(fs.readFileSync(svglintIgnoredFile, 'utf8'));
|
const svglintIgnores = JSON.parse(fs.readFileSync(svglintIgnoredFile, 'utf8'));
|
||||||
|
|
||||||
const svgRegexp =
|
const svgRegexp =
|
||||||
/^<svg( [^\s]*=".*"){3}><title>.*<\/title><path d=".*"\/><\/svg>\n?$/;
|
/^<svg( [^\s]*=".*"){3}><title>.*<\/title><path d=".*"\/><\/svg>$/;
|
||||||
const negativeZerosRegexp = /-0(?=[^\.]|[\s\d\w]|$)/g;
|
const negativeZerosRegexp = /-0(?=[^\.]|[\s\d\w]|$)/g;
|
||||||
|
|
||||||
const iconSize = 24;
|
const iconSize = 24;
|
||||||
|
@ -61,9 +61,7 @@ export const testIcon = (icon, subject, slug) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('has a valid svg value', () => {
|
it('has a valid svg value', () => {
|
||||||
const svgFileContents = fs
|
const svgFileContents = fs.readFileSync(svgPath, 'utf8');
|
||||||
.readFileSync(svgPath, 'utf8')
|
|
||||||
.replace(/\r?\n/, '');
|
|
||||||
assert.equal(subject.svg, svgFileContents);
|
assert.equal(subject.svg, svgFileContents);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user