Fix dash-insensitivity in get-function() (#795)

Closes #792
This commit is contained in:
Natalie Weizenbaum 2019-08-14 12:20:47 -07:00 committed by GitHub
parent e8a50acf31
commit 0e5ed4a37d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 6 deletions

View File

@ -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.

View File

@ -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";

View File

@ -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";

View File

@ -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