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

If a wildcard is set to 0 disable another wildcard? #76

Open
DivanoDova opened this issue Apr 9, 2023 · 3 comments
Open

If a wildcard is set to 0 disable another wildcard? #76

DivanoDova opened this issue Apr 9, 2023 · 3 comments

Comments

@DivanoDova
Copy link

Is there a way to disable another wildcard if the another one is set to 0

For Example if have this prompt: {0-2$$__mywildcard/chairs__} {0-2$$__mywildcard/colors__},
And i want to avoid using __mywildcard/colors__ if theres is no __mywildcard/chairs__

So what i need is a way to put 0 to __mywildcard/colors__ if __mywildcard/chairs__ is put to 0

Thanks

@akx
Copy link
Collaborator

akx commented Apr 12, 2023

It's not exactly the same, but

{0-2$$__mywildcard/chairs__ __mywildcard/colors__}

would give you 0 to 2 repetitions of chair + color – would that work?

@DivanoDova
Copy link
Author

DivanoDova commented Apr 13, 2023

It's not exactly the same, but

{0-2$$__mywildcard/chairs__ __mywildcard/colors__}

would give you 0 to 2 repetitions of chair + color – would that work?

I just tried to do this but it seems to always return one chair and one colors never 0 or 2

@adieyal
Copy link
Owner

adieyal commented Apr 15, 2023

The reason why that doesn't work is because the variant wildcard syntax only works for wildcards, not other tokens, i.e. {0-2$$_mywildcard/chairs__} works but {0-2$$_mywildcard/chairs__ anything_else_here} won't

I don't think we have a solution for this yet.

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

3 participants