diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b20e33fb..4956277b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.22.10 + +* Fix a bug in which `get-function()` would fail to find a dash-separated + function when passed a function name with underscores. + ## 1.22.9 * Include argument names when reporting range errors and selector parse errors. diff --git a/lib/src/visitor/async_evaluate.dart b/lib/src/visitor/async_evaluate.dart index 4d7721357..fbc142c34 100644 --- a/lib/src/visitor/async_evaluate.dart +++ b/lib/src/visitor/async_evaluate.dart @@ -331,8 +331,10 @@ class _EvaluateVisitor var callable = css ? PlainCssCallable(name.text) - : _addExceptionSpan(_callableNode, - () => _getFunction(name.text, namespace: module?.text)); + : _addExceptionSpan( + _callableNode, + () => _getFunction(name.text.replaceAll("_", "-"), + namespace: module?.text)); if (callable != null) return SassFunction(callable); throw "Function not found: $name"; diff --git a/lib/src/visitor/evaluate.dart b/lib/src/visitor/evaluate.dart index d771c817f..b8b05f9d4 100644 --- a/lib/src/visitor/evaluate.dart +++ b/lib/src/visitor/evaluate.dart @@ -5,7 +5,7 @@ // DO NOT EDIT. This file was generated from async_evaluate.dart. // See tool/grind/synchronize.dart for details. // -// Checksum: c8527e9c89f7ebbab760b62b70da66d1b01b2bf3 +// Checksum: fdeda387299e1ad0e9d50f22ae32ab0cf1ff6e30 // // ignore_for_file: unused_import @@ -339,8 +339,10 @@ class _EvaluateVisitor var callable = css ? PlainCssCallable(name.text) - : _addExceptionSpan(_callableNode, - () => _getFunction(name.text, namespace: module?.text)); + : _addExceptionSpan( + _callableNode, + () => _getFunction(name.text.replaceAll("_", "-"), + namespace: module?.text)); if (callable != null) return SassFunction(callable); throw "Function not found: $name"; diff --git a/pubspec.yaml b/pubspec.yaml index 2d85af5a4..6812c9b05 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: sass -version: 1.22.9 +version: 1.22.10 description: A Sass implementation in Dart. author: Sass Team homepage: https://github.com/sass/dart-sass