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

get-function with underscore in function name fails with "Function not found" #792

Closed
znck opened this issue Aug 8, 2019 · 1 comment · Fixed by #795
Closed

get-function with underscore in function name fails with "Function not found" #792

znck opened this issue Aug 8, 2019 · 1 comment · Fixed by #795
Assignees
Labels

Comments

@znck
Copy link

znck commented Aug 8, 2019

Demo: https://repl.it/repls/TanHeavyNonlinearprogramming

I tried to write test but dart is beyond me.

@znck znck changed the title get-function with underscore in function fails with "Function not found" get-function with underscore in function name fails with "Function not found" Aug 8, 2019
@lunelson
Copy link

lunelson commented Aug 9, 2019

I just hit this too. Took me a while to track it down, seems to have come up in a recent patch.

Sass' internal re-mapping of _ to - on function and variable-names was known to me, but I'd never seen it pose a problem WRT function lookup before. The following code works in libsass and worked in dart-sass as of 1.22.0, but now fails without any clues as to the reason (Error: Function not found: test_fn).

Note that if I assign $test-fn: get-function('test-fn');, replacing the _ with - myself, it works.

@function test_fn($args...) { @return $args; }

$test-fn: get-function('test_fn');

.test {
  output: call($test-fn, foo, bar);
}
/* libsass only */
.test {
  output: foo, bar;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants