rustywind icon indicating copy to clipboard operation
rustywind copied to clipboard

Fix regex for parsing css classes

Open DanikVitek opened this issue 1 year ago • 1 comments

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

DanikVitek avatar Mar 28 '24 15:03 DanikVitek

Closes #98

DanikVitek avatar Mar 28 '24 16:03 DanikVitek

Thanks @DanikVitek, could you make a test. Thanks

praveenperera avatar Apr 04 '24 19:04 praveenperera

Thanks @DanikVitek, could you make a test. Thanks

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

DanikVitek avatar May 02 '24 14:05 DanikVitek

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

praveenperera avatar May 14 '24 13:05 praveenperera

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.

Rolv-Apneseth avatar May 24 '24 17:05 Rolv-Apneseth

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 avatar May 24 '24 18:05 DanikVitek

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

DanikVitek avatar Jun 10 '24 23:06 DanikVitek

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.

Rolv-Apneseth avatar Jun 10 '24 23:06 Rolv-Apneseth

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

praveenperera avatar Jun 12 '24 15:06 praveenperera