Skip to content

[SCSS] crashes when scss contains parentheses in value #5375

@llwt

Description

@llwt

Prettier 1.15.1
Playground link

--parser scss

Input:

.something {
  grid-template-columns: 1 2fr (3 + 4);
}

Output:

TypeError: Cannot read property 'start' of undefined
    at Object.genericPrint [as print] (https://prettier.io/lib/standalone.js:17462:62)
    at callPluginPrintFunction (https://prettier.io/lib/standalone.js:15827:18)
    at https://prettier.io/lib/standalone.js:15778:16
    at Object.printComments (https://prettier.io/lib/standalone.js:15512:17)
    at printGenerically (https://prettier.io/lib/standalone.js:15777:22)
    at FastPath.call (https://prettier.io/lib/standalone.js:15623:16)
    at Object.genericPrint [as print] (https://prettier.io/lib/standalone.js:17319:21)
    at callPluginPrintFunction (https://prettier.io/lib/standalone.js:15827:18)
    at https://prettier.io/lib/standalone.js:15778:16
    at Object.printComments (https://prettier.io/lib/standalone.js:15512:17)

Expected behavior:
Parser should accept valid scss.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:css/scss/lessIssues affecting CSS, Less or SCSSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.status:has prIssues with an accompanying pull request. These issues will probably be fixed soon!

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions