[go: nahoru, domu]

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

Escape class name components #4

Merged
merged 1 commit into from
Nov 12, 2018

Conversation

alexarchambault
Copy link
Contributor

This PR proposes to escape the class name components prior to passing them to regexes.

For standard / usual class names, this shouldn't change the current behavior.

For class names having non standard characters ($ in particular), this allows to shade these with jarjar. Without this PR, these are currently simply not escaped (as the $ signs get interpreted as end-of-line from the regexes).

I'm kind of new to this codebase, any direction would be welcome about where and how to add non regression tests for these (unless I'm mistaken, I couldn't find a comprehensive test suite in the current code).

Allows to shade classes having $ signs in their name
@shevek
Copy link
Owner
shevek commented Nov 12, 2018

This whole section of the code needs significant testing if we're going to keep it stable and merge many more PRs, but I'm going to merge this for now based on inspection.

@shevek shevek merged commit 201fe48 into shevek:master Nov 12, 2018
@shevek
Copy link
Owner
shevek commented Nov 12, 2018

Note please that another patch which handled $ slightly differently went in as #5 - it may be that we have a specification round and the behaviour becomes documented and canonical between you and @zawn

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.

None yet

2 participants