Skip to content

bug: doesn't parse url(../file.png) #78

@wetneb

Description

@wetneb

Did you check existing issues?

  • I have read all the tree-sitter docs if it relates to using the parser
  • I have searched the existing issues of tree-sitter-css

Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)

No response

Describe the bug

Parse the following:

.test {
	background: url(../test.png)
 }

Steps To Reproduce/Bad Parse Tree

(stylesheet [0, 0] - [3, 0]
  (rule_set [0, 0] - [2, 2]
    (selectors [0, 0] - [0, 5]
      (class_selector [0, 0] - [0, 5]
        (class_name [0, 1] - [0, 5]
          (identifier [0, 1] - [0, 5]))))
    (block [0, 6] - [2, 2]
      (declaration [1, 1] - [1, 28]
        (property_name [1, 1] - [1, 11])
        (plain_value [1, 13] - [1, 16])
        (ERROR [1, 16] - [1, 19])
        (plain_value [1, 19] - [1, 28]))
      (ERROR [1, 28] - [1, 29]))))

Expected Behavior/Parse Tree

No parsing error

Repro

.test {
	background: url(../test.png)
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions