Visitar URL original
Last semicolon in file is not parsed · Issue #1806 · postcss/postcss · GitHub
Skip to content

Last semicolon in file is not parsed #1806

Closed

Description

@mvorisek

LESS file:

@variable: {
  field: something;
};

is currently parsed wrongly and the raws property contains:

raws: { semicolon: false, after: ';\n' },

but I would expect:

raws: { semicolon: true, after: '\n' },

Observations:

  • the problem seems to be in lib/parser.js file
  • the semicolon is not consumed only for the last LESS variable in file
  • file like @variable: something; (ie. variable without curly brackets) has the semicolon consumed correctly

Activity

  1. ai commented on Dec 17, 2022

    @ai
    Member

    You need to open issue at PostCSS Less parser.

    This repo is for standard CSS parser. It is illegal syntax for it.

  2. mvorisek commented on Dec 17, 2022

    @mvorisek
    Author

    Sorry for opening an issue here, I belive the problem is in prettier itself - see prettier/prettier#14007.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions