mirror of
https://github.com/Mibew/simple-icons.git
synced 2024-11-15 09:54:11 +03:00
Update Elsevier; fix edge case error in 'collinear segments' lint rule (#5175)
This commit is contained in:
parent
ee606d8ba4
commit
a4276d1915
File diff suppressed because one or more lines are too long
@ -369,12 +369,20 @@ module.exports = {
|
|||||||
cmd = seg[0],
|
cmd = seg[0],
|
||||||
nextCmd = s + 1 < segments.length ? segments[s + 1][0] : null;
|
nextCmd = s + 1 < segments.length ? segments[s + 1][0] : null;
|
||||||
|
|
||||||
if ('LM'.includes(cmd)) {
|
if (cmd === 'L') {
|
||||||
currAbsCoord[0] = seg[1];
|
currAbsCoord[0] = seg[1];
|
||||||
currAbsCoord[1] = seg[2];
|
currAbsCoord[1] = seg[2];
|
||||||
} else if ('lm'.includes(cmd)) {
|
} else if (cmd === 'l') {
|
||||||
currAbsCoord[0] = (!currAbsCoord[0] ? 0 : currAbsCoord[0]) + seg[1];
|
currAbsCoord[0] = (!currAbsCoord[0] ? 0 : currAbsCoord[0]) + seg[1];
|
||||||
currAbsCoord[1] = (!currAbsCoord[1] ? 0 : currAbsCoord[1]) + seg[2];
|
currAbsCoord[1] = (!currAbsCoord[1] ? 0 : currAbsCoord[1]) + seg[2];
|
||||||
|
} else if (cmd === 'm') {
|
||||||
|
currAbsCoord[0] = (!currAbsCoord[0] ? 0 : currAbsCoord[0]) + seg[1];
|
||||||
|
currAbsCoord[1] = (!currAbsCoord[1] ? 0 : currAbsCoord[1]) + seg[2];
|
||||||
|
startPoint = undefined;
|
||||||
|
} else if (cmd === 'M') {
|
||||||
|
currAbsCoord[0] = seg[1];
|
||||||
|
currAbsCoord[1] = seg[2];
|
||||||
|
startPoint = undefined;
|
||||||
} else if (cmd === 'H') {
|
} else if (cmd === 'H') {
|
||||||
currAbsCoord[0] = seg[1];
|
currAbsCoord[0] = seg[1];
|
||||||
} else if (cmd === 'h') {
|
} else if (cmd === 'h') {
|
||||||
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 53 KiB |
Loading…
Reference in New Issue
Block a user