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

Fix regex for parsing css classes #99

Merged
merged 7 commits into from
Jun 12, 2024
Merged

Conversation

DanikVitek
Copy link
Contributor

@DanikVitek DanikVitek commented Mar 28, 2024

  • Replace class(Name)* with class(Name)?
  • Add support for (, ), ,, and # in class names

- Replace `class(Name)*` with `class(Name)?`
- Add support for `(`, `)`, and `,` in class names
- Add support for `#` in class names
@DanikVitek
Copy link
Contributor Author

Closes #98

@praveenperera
Copy link
Member

Thanks @DanikVitek, could you make a test. Thanks

@DanikVitek
Copy link
Contributor Author

DanikVitek commented May 2, 2024

Thanks @DanikVitek, could you make a test. Thanks

Sorry for late response. I've added a few tests. (They were generated by phind)

@praveenperera
Copy link
Member

@DanikVitek looks good thanks!, just solve conflicts and I will merge

@Rolv-Apneseth
Copy link
Contributor

Rolv-Apneseth commented May 24, 2024

The conflicts might be annoying to resolve, this was before the splitting of the libraries wasn't it.

For the tests: in a previous PR I added the test-case crate which might be nice to reduce the repetition in those assert statements (used here). Also I think there should be some failing tests, i.e. ones that don't match.

@DanikVitek
Copy link
Contributor Author

Sorry for the delay, It's the end of the semester and I need to deal with my studies. I might be able to get to fixing the conflicts the next week.

@DanikVitek
Copy link
Contributor Author

@praveenperera Seems to be fine. Though I'm not sure which failing test cases should I add

@Rolv-Apneseth
Copy link
Contributor

Nice, hopefully this gets merged soon.

Though I'm not sure which failing test cases should I add

To be honest it's probably fine, it should be caught by the other tests. But I meant just strings that it shouldn't match, like random strings or html/jsx elements without class(name) etc.

@praveenperera
Copy link
Member

Thanks @Rolv-Apneseth and @DanikVitek I will get this merged today

@praveenperera praveenperera merged commit bbd9491 into avencera:master Jun 12, 2024
15 checks passed
@DanikVitek DanikVitek deleted the patch-1 branch June 12, 2024 22:27
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

Successfully merging this pull request may close these issues.

3 participants