File tree Expand file tree Collapse file tree 2 files changed +45
-1
lines changed
test/migrators/module/remove_prefix_flag Expand file tree Collapse file tree 2 files changed +45
-1
lines changed Original file line number Diff line number Diff line change @@ -1256,7 +1256,12 @@ class _ModuleMigrationVisitor extends MigrationVisitor {
1256
1256
var unprivateName = isPrivate ? _privateToPublic (name) : name;
1257
1257
var prefix = _prefixFor (unprivateName);
1258
1258
if (prefix == null ) return name;
1259
- return (isPrivate ? '-' : '' ) + unprivateName.substring (prefix.length);
1259
+
1260
+ var withoutPrefix = unprivateName.substring (prefix.length);
1261
+ if (_isPrivate (withoutPrefix)) {
1262
+ withoutPrefix = _privateToPublic (withoutPrefix);
1263
+ }
1264
+ return (isPrivate ? '-' : '' ) + withoutPrefix;
1260
1265
}
1261
1266
1262
1267
/// Returns the namespace that built-in module [module] is loaded under.
Original file line number Diff line number Diff line change
1
+ <==> arguments
2
+ --remove-prefix=lib
3
+
4
+ <==> input/entrypoint.scss
5
+ $lib-a: 5;
6
+ $lib_b: $lib-a + 2;
7
+
8
+ @function lib-fn($lib-local) {
9
+ @return $lib-local;
10
+ }
11
+
12
+ @mixin lib-mixin {
13
+ lib-property: lib-value;
14
+ }
15
+
16
+ lib-selector {
17
+ lib-property: lib-fn(0);
18
+ @include lib-mixin;
19
+ }
20
+
21
+ <==> output/entrypoint.scss
22
+ $a: 5;
23
+ $b: $a + 2;
24
+
25
+ @function fn($lib-local) {
26
+ @return $lib-local;
27
+ }
28
+
29
+ @mixin mixin {
30
+ lib-property: lib-value;
31
+ }
32
+
33
+ lib-selector {
34
+ lib-property: fn(0);
35
+ @include mixin;
36
+ }
37
+
38
+ <==> output/entrypoint.import.scss
39
+ @forward "entrypoint" as lib-*;
You can’t perform that action at this time.
0 commit comments