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

KDL layouts: Problematic node names #1818

Closed
raphCode opened this issue Oct 19, 2022 · 2 comments
Closed

KDL layouts: Problematic node names #1818

raphCode opened this issue Oct 19, 2022 · 2 comments

Comments

@raphCode
Copy link
Contributor

raphCode commented Oct 19, 2022

#1759
This is sort of an oddball problem, since users probably have to try to hit this problem, but I reported it nonetheless.
More pane node names can be defined than make sense.
We might display a more meaningful error that hints at quoting if that resolves the issue or forbid certain names altogether.

I have tested this only with pane template names but I am sure there can be more places where these problems apply.

Empty string

layout {
    pane_template name="" {
        command "ls"
    }
    ""
}

works, but that seems strange somehow

Numbers at the beginning

layout {
    pane_template name="0test" {
        command "ls"
    }
    0test
}

Kdl Deserialization Error
Quoting the second 0test works.
Plain number without letters are also affected.

Special characters

layout {
    pane_template name="hello(test)" {
        command "ls"
    }
    hello(test)
}

Failed to deserialize KDL node.

Basically the same case as with numbers, except now the special characters cause also trouble when they occur in the middle of the node name.
Quoting works again.
I haven't tested this exhaustedly, but I would guess there are a lot of special characters that may cause trouble.

@raphCode raphCode changed the title KDL strange node names KDL: Problematic node names Oct 19, 2022
@raphCode raphCode changed the title KDL: Problematic node names KDL layouts: Problematic node names Oct 19, 2022
@imsnif
Copy link
Member

imsnif commented Oct 20, 2022

Btw, for the record !@#$%^&* is a valid template name and runs as expected ;P

@imsnif
Copy link
Member

imsnif commented Oct 20, 2022

Fixed in #1831

@imsnif imsnif closed this as completed Oct 20, 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

2 participants