@@ -8,7 +8,7 @@ import {ArgumentList, ArgumentListProps} from '../argument-list';
88import { LazySource } from '../lazy-source' ;
99import { NodeProps } from '../node' ;
1010import { RawWithValue } from '../raw-with-value' ;
11- import type * as sassInternal from '../sass-internal' ;
11+ import * as sassInternal from '../sass-internal' ;
1212import * as utils from '../utils' ;
1313import { Expression } from '.' ;
1414
@@ -34,7 +34,7 @@ export interface FunctionExpressionRaws {
3434 * The function's namespace.
3535 *
3636 * This may be different than {@link FunctionExpression.namespace} if the
37- * namespace contains escape codes or underscores .
37+ * namespace contains escape codes.
3838 */
3939 namespace ?: RawWithValue < string > ;
4040
@@ -59,8 +59,8 @@ export class FunctionExpression extends Expression {
5959 /**
6060 * This function's namespace.
6161 *
62- * This is the parsed and normalized value, with underscores converted to
63- * hyphens and escapes resolved to the characters they represent.
62+ * This is the parsed and normalized value, with escapes resolved to the
63+ * characters they represent.
6464 */
6565 get namespace ( ) : string | undefined {
6666 return this . _namespace ;
@@ -136,9 +136,11 @@ export class FunctionExpression extends Expression {
136136 ( this . namespace
137137 ? ( this . raws . namespace ?. value === this . namespace
138138 ? this . raws . namespace . raw
139- : this . namespace ) + '.'
139+ : sassInternal . toCssIdentifier ( this . namespace ) ) + '.'
140140 : '' ) +
141- ( this . raws . name ?. value === this . name ? this . raws . name . raw : this . name ) +
141+ ( this . raws . name ?. value === this . name
142+ ? this . raws . name . raw
143+ : sassInternal . toCssIdentifier ( this . name ) ) +
142144 this . arguments
143145 ) ;
144146 }
0 commit comments