css/gonzales

Multiline comments are parsed wrong and break line numbers

Opened this issue · 0 comments

If the CSS contains a multiline comment, only the first line of the comment is parsed. The rest of the comment is ignored. This also breaks the line numbers of the tokens after it.

/*
  Multiline comments like
  this one break the line 
  numbers of the tokens
  after them.
*/
div {
  color: red;
}

produces the following ast

[
  {
    "ln": 1
  },
  "stylesheet",
  [
    {
      "ln": 1
    },
    "comment",
    "Multiline comments like"
  ],
  [
    {
      "ln": 1
    },
    "s",
    "\n"
  ],
  [
    {
      "ln": 2
    },
    "ruleset",
    [
      {
        "ln": 2
      },
      "selector",
      [
        {
          "ln": 2
        },
        "simpleselector",
        [
          {
            "ln": 2
          },
          "ident",
          "div"
        ],
        [
          {
            "ln": 2
          },
          "s",
          " "
        ]
      ]
    ],
    [
      {
        "ln": 2
      },
      "block",
      [
        {
          "ln": 2
        },
        "s",
        "\n  "
      ],
      [
        {
          "ln": 3
        },
        "declaration",
        [
          {
            "ln": 3
          },
          "property",
          [
            {
              "ln": 3
            },
            "ident",
            "color"
          ]
        ],
        [
          {
            "ln": 3
          },
          "value",
          [
            {
              "ln": 3
            },
            "s",
            " "
          ],
          [
            {
              "ln": 3
            },
            "ident",
            "red"
          ]
        ]
      ],
      [
        {
          "ln": 3
        },
        "decldelim"
      ],
      [
        {
          "ln": 3
        },
        "s",
        "\n"
      ]
    ]
  ],
  [
    {
      "ln": 4
    },
    "s",
    "\n"
  ]
]

Is there any possibility, that this will be fixed in the near future? And that open pull requests like #12 are accepted? Or is this project as dead as it seems?