Skip to content

Missing support for selectors with CSS escapes #26

@VladyslavG

Description

@VladyslavG

Let's say we have a selector used to select an element in HTML with the class name "10w"

.\31 0w

This is valid selector according to https://jigsaw.w3.org/css-validator/#validate_by_input (enter .\31 0w {})

But when we parse it we get the following result

  {
    "type": "selectors",
    "nodes": [
        {
            "type": "selector",
            "nodes": [
                {
                    "type": "element",
                    "name": "31"
                },
                {
                    "type": "spacing",
                    "value": " "
                },
                {
                    "type": "invalid",
                    "value": "0"
                },
                {
                    "type": "element",
                    "name": "w"
                }
            ]
        }
    ]
}

While expected result is

  {
    "type": "selectors",
    "nodes": [
        {
            "type": "selector",
            "nodes": [
                {
                    "type": "class",
                    "name": "10w"
                }
            ]
        }
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions