镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Ensure first argument to var(…) still unescapes \_ - #16206

Merged
philipp-spiess merged 5 commits into
mainfrom
fix/var-unescape-underlines
Feb 4, 2025
Merged

philipp-spiess merged 5 commits into
mainfrom
fix/var-unescape-underlines

Conversation

@philipp-spiess

Copy link
Copy Markdown
Contributor

Resolves #16170

This PR fixes an issue where the previously opted-out escaping of the first argument for the var(…) function was not unescaped at all. This was introduced in #14776 where the intention was to not require escaping of underscores in the var function (e.g. ml-[var(--spacing-1_5)]). However, I do think it still makes sense to unescape an eventually escaped underline for consistency.

Test plan

The example from #1670 now parses as expected:

Screenshot 2025-02-03 at 13 51 35

@philipp-spiess
philipp-spiess requested a review from a team as a code owner February 3, 2025 12:51
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
@philipp-spiess
philipp-spiess merged commit 9fd6766 into main Feb 4, 2025
@philipp-spiess
philipp-spiess deleted the fix/var-unescape-underlines branch February 4, 2025 14:13
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.

[v4] Inconsistent underscore

2 participants