Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selector returns weird symbol instead of attribute value #26

Closed
natarius opened this issue Sep 17, 2021 · 4 comments
Closed

selector returns weird symbol instead of attribute value #26

natarius opened this issue Sep 17, 2021 · 4 comments

Comments

@natarius
Copy link

so I have this selector here

footprint[uid="ca135f26-2b55-db63-7451-5a8effb2a19f"] > pad[uid="100a8763-0d5f-de60-23a5-00d74f3ecad7"]

and oddly it returns a § as value for the right side attribute

full response:

{
	"type": "complex",
	"combinator": ">",
	"left": {
		"type": "compound",
		"list": [
			{
				"type": "type",
				"content": "footprint",
				"name": "footprint",
				"pos": [
					0,
					9
				]
			},
			{
				"type": "attribute",
				"content": "[uid=\"ca135f26-2b55-db63-7451-5a8effb2a19f\"]",
				"name": "uid",
				"operator": "=",
				"value": "\"ca135f26-2b55-db63-7451-5a8effb2a19f\"",
				"pos": [
					9,
					18
				]
			}
		]
	},
	"right": {
		"type": "compound",
		"list": [
			{
				"type": "type",
				"content": "pad",
				"name": "pad",
				"pos": [
					21,
					24
				]
			},
			{
				"type": "attribute",
				"content": "[uid=\"§\"]",
				"name": "uid",
				"operator": "=",
				"value": "\"§\"",
				"pos": [
					24,
					33
				]
			}
		]
	}
}
@fffilo
Copy link

fffilo commented Feb 15, 2022

Same problem...

Input:

parsel.tokenize('[data-abcde="abcde"][data-xyz="xyz"]');

Result:

[
    {
        "type": "attribute",
        "content": "[data-abcde=\"abcde\"]",
        "name": "data-abcde",
        "operator": "=",
        "value": "\"abcde\"",
        "pos": [
            0,
            16
        ]
    },
    {
        "type": "attribute",
        "content": "[data-xyz=\"§\"]",
        "name": "data-xyz",
        "operator": "=",
        "value": "\"§\"",
        "pos": [
            16,
            30
        ]
    }
]

@fffilo
Copy link

fffilo commented Mar 30, 2022

It looks like this pull request solves the issue.

brettalewis added a commit to brettalewis/parsel that referenced this issue Nov 7, 2022
@brettalewis
Copy link
Contributor

This issue should be solved by the PR that was merged yesterday.

@LeaVerou
Copy link
Owner

LeaVerou commented Nov 8, 2022

Closing then!

@LeaVerou LeaVerou closed this as completed Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants