-
Notifications
You must be signed in to change notification settings - Fork 67
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
Allow for spaces between quotes in nodes #104
Comments
Is this for the new version of the editor? I need to figure out a good way to handle this. |
Yes. |
For anyone who wants to help with this (I am not an expert in regex):Currently when entering new permissions, this regex is used to check for multiple permissions being added - This works perfectly for any cases where there are multiple permissions separated by space, or multiple spaces and hyphens (as if it were copied from a yaml file). The regex needs to also check for quotes Here's an example on regexr: https://regexr.com/4smc5 Hoping that someone will have a solution for this :) |
Maybe only split on comma (similar to how tags on various sites work)? |
But then users can't paste multiple permissions from various sources. It is almost always spaces, or spaces with hyphens. |
\s*(?:,|-)?\s+ That alone is an improvement. Working on one that handles those cases properly. |
After a bit of discussion the question came up as to why you don't just split at the newline? And to trim them, always trim the left side and if it's then not a prefix or suffix node, also trim the right side. |
Because new lines aren't supported in a text input, they are converted to spaces. I feel like it should be a requirement that prefixes/suffixes which include spaces should be wrapped in quotes. |
I did some searching and found |
When trying to add prefixes to already created ranks on the LuckPerms editor, it doesn't allow spaces.
Not sure if there is anyway you can fix this, as it sets anything after a space as another permission.
Maybe you could add a separate option for prefixes, or maybe allow " ".
The text was updated successfully, but these errors were encountered: