Skip to content

Everything dropped after () #31

@vjeux

Description

@vjeux
  • Node Version: 4.3.2
  • NPM Version: 3.10.10
  • postcss-values-parser Version: 1.2.2

This issue is regarding a problem with:

  • Standard CSS
url() center center no-repeat black
{
  "raws": {
    "before": "",
    "after": ""
  },
  "nodes": [
    {
      "raws": {
        "before": "",
        "after": ""
      },
      "nodes": [
        {
          "raws": {
            "before": "",
            "after": ""
          },
          "value": "url", // <--------------------------------
          "source": {
            "start": {
              "line": 1,
              "column": 1
            },
            "end": {
              "line": 1,
              "column": 3
            }
          },
          "sourceIndex": 0,
          "nodes": [
            {
              "raws": {
                "before": "",
                "after": ""
              },
              "value": "(", // <--------------------------------
              "source": {
                "start": {
                  "line": 1,
                  "column": 4
                },
                "end": {
                  "line": 1,
                  "column": 3
                }
              },
              "sourceIndex": 3,
              "type": "paren",
              "parenType": ""
            },
            {
              "raws": {
                "before": "",
                "after": ""
              },
              "value": "black", // <--------------------------------
              "source": {
                "start": {
                  "line": 1,
                  "column": 31
                },
                "end": {
                  "line": 1,
                  "column": 35
                }
              },
              "sourceIndex": 30,
              "type": "word",
              "isHex": false,
              "isColor": false
            }
          ],
          "type": "func",
          "unbalanced": 1 // <--------------------------------
        }
      ],
      "type": "value",
      "unbalanced": 0
    }
  ],
  "type": "root"
}

Expected Behavior

It should give me the full ast so that I can print url() center center no-repeat black back

Actual Behavior

Right now, it only gives me url( black and unbalanced: 1

How can we reproduce the behavior?

Just parse this block of code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions