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

Ensure multiple theme(spacing[5]) calls with bracket notation in arbitrary properties work #11039

Merged
merged 2 commits into from
Apr 19, 2023

Conversation

RobinMalfait
Copy link
Contributor

This PR fixes an issue where multiple calls using theme(spacing[5]) with arbitrary properties wouldn't be matched completely.

The issue is that the brackets

Given this input:

<div class="[width:_calc(theme(spacing[5])_+_theme(spacing[5]))]"></div>

Then we would expect the match to be this:

[width:_calc(theme(spacing[5])_+_theme(spacing[5]))]

However, before this change, it would stop too early and it results in:

[width:_calc(theme(spacing[5])_+_theme(spacing[5]

Which makes it incomplete because the ))] are missing at the end.

This also means that the matched candidate (class in your html) is incomplete and not valid.

Fixes: #11034

@RobinMalfait RobinMalfait changed the title Ensure multiple theme(spacing.[5]) calls with bracket notation in arbitrary properties work Ensure multiple theme(spacing[5]) calls with bracket notation in arbitrary properties work Apr 19, 2023
Given this input:
```html
<div class="[width:_calc(theme(spacing[5])_+_theme(spacing[5]))]"></div>
```

Then we would expect the match to be this:
```
[width:_calc(theme(spacing[5])_+_theme(spacing[5]))]
```

However, with the `?`, then it would stop and result in:
```
[width:_calc(theme(spacing[5])_+_theme(spacing[5]
```

Which makes it incomplete because the `))]` are missing at the end.
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

1 participant