-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Labels
lang:lessIssues affecting Less-specific syntax (not plain CSS)Issues affecting Less-specific syntax (not plain CSS)status:needs investigationIssues that need additional investigation, e.g. to understand whether the reported behavior is a bugIssues that need additional investigation, e.g. to understand whether the reported behavior is a bug
Description
Prettier 2.6.0
Playground link
--parser less
Input:
.background-gradient(@cut) {
background: linear-gradient(
to right,
@white 0%,
@white (@cut - 0.01%),
@portal-background @cut,
@portal-background 100%
);
}
Output:
TypeError: Cannot read properties of undefined (reading 'endOffset')
at v (https://prettier.io/lib/standalone.js:75:220)
at w (https://prettier.io/lib/standalone.js:36:316)
at https://prettier.io/lib/standalone.js:75:11235
at https://prettier.io/lib/standalone.js:41:9097
at u.each (https://prettier.io/lib/standalone.js:41:8932)
at u.map (https://prettier.io/lib/standalone.js:41:9077)
at Object.Ue [as print] (https://prettier.io/lib/standalone.js:75:10845)
at F (https://prettier.io/lib/standalone.js:41:11582)
at T (https://prettier.io/lib/standalone.js:41:11105)
at https://prettier.io/lib/standalone.js:41:10991
Expected behavior:
Prettier doesn't break. Version 2.5.1 works fine.
viceice, osamasayed, jimblue, wheeler and builtbylane
Metadata
Metadata
Assignees
Labels
lang:lessIssues affecting Less-specific syntax (not plain CSS)Issues affecting Less-specific syntax (not plain CSS)status:needs investigationIssues that need additional investigation, e.g. to understand whether the reported behavior is a bugIssues that need additional investigation, e.g. to understand whether the reported behavior is a bug