Skip to content

Proposal: Support check types #121

@fisker

Description

@fisker

For this code [1, '1', true, 'true'], there is no way to distinguish number/boolean and string (expect use [raw=], which is not safe).

I can see two solutions:

  1. Treat quoted attribute value as string, otherwise as literal value

    [value="1"] matches '1' not 1, [value="true"] matches 'true' not true, this can also prevent [value<2] unwanted matches sting '1'.

    I understand this will be a breaking change, but I still think worth to do it.

  2. Add a new pseudo selector :type([value], 'string') or something like this.

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