Skip to content

Handle balanced parens when searching for helper functions #1354

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

Merged
merged 4 commits into from
May 13, 2025

Conversation

thecrypticace
Copy link
Contributor

Fixes #1285

The regex would cause things like this to not work properly:

.foo {
  color: my-config(theme('fontFamily.sans'))
}

You'd get an error message like this:

'theme('fontFamily.sans' does not exist in your theme config.(invalidConfigPath)

Which means:

  1. It saw config instead of my-config
  2. It didn't handle nested parens correctly
  3. the nested theme function wasn't found

This PR fixes all three of these

@thecrypticace thecrypticace force-pushed the feat/better-fn-lookup branch from ab5c8ba to ebfd909 Compare May 13, 2025 16:14
@thecrypticace thecrypticace merged commit e2cfc2c into main May 13, 2025
11 of 12 checks passed
@thecrypticace thecrypticace deleted the feat/better-fn-lookup branch May 13, 2025 16:20
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.

Broken as of 0.14.4 - invalidConfigPath when using -theme or -config
2 participants