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

Add support for regexes to allow property values #26

Merged
merged 1 commit into from
Jan 3, 2023

Conversation

aprendendofelipe
Copy link
Contributor

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and couldn’t find anything (or linked relevant results below)
  • If applicable, I’ve added docs and tests

Description of changes

Sometimes it can be unsafe to allow any values for a property while there may be so many safe values that you would need to pass a very large list.

I propose to also accept RegEx in the list of allowed property values.

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Jan 2, 2023
Copy link
Member

@wooorm wooorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Some ideas on how to improve it. Also, CI is failing, seems to be due to the changes, or was it already failing locally for you?

readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
lib/index.js Outdated Show resolved Hide resolved
@aprendendofelipe
Copy link
Contributor Author

Good idea. Some ideas on how to improve it. Also, CI is failing, seems to be due to the changes, or was it already failing locally for you?

It was giving error because of the typing of handleTagName, so I ignored the errors and didn't catch the new errors. Now it's passing.

lib/index.js Show resolved Hide resolved
lib/index.js Outdated Show resolved Hide resolved
@wooorm wooorm changed the title Support RegExp in the list of valid property values Add support for regexes to allow property values Jan 3, 2023
@wooorm wooorm merged commit 7ca7c4c into syntax-tree:main Jan 3, 2023
@wooorm wooorm added 🦋 type/enhancement This is great to have 💪 phase/solved Post is done labels Jan 3, 2023
@github-actions

This comment has been minimized.

@github-actions github-actions bot removed the 🤞 phase/open Post is being triaged manually label Jan 3, 2023
@aprendendofelipe aprendendofelipe deleted the regex-property-value branch January 3, 2023 12:26
@wooorm
Copy link
Member

wooorm commented Jan 3, 2023

Thanks, released!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 phase/solved Post is done 🦋 type/enhancement This is great to have
Development

Successfully merging this pull request may close these issues.

None yet

2 participants