@@ -91,7 +91,7 @@ function detectImports(content: string, prefix: string): {imports: string[], nam
91
91
return { imports, namespaces} ;
92
92
}
93
93
94
- /** Migrates the Material symbls in a file. */
94
+ /** Migrates the Material symbols in a file. */
95
95
function migrateMaterialSymbols ( content : string , importPath : string , namespaces : string [ ] ) : string {
96
96
const initialContent = content ;
97
97
const namespace = 'mat' ;
@@ -142,6 +142,7 @@ function migrateCdkSymbols(content: string, importPath: string, namespaces: stri
142
142
* Renames all Sass symbols in a file based on a pre-defined mapping.
143
143
* @param content Content of a file to be migrated.
144
144
* @param mapping Mapping between symbol names and their replacements.
145
+ * @param namespaces Names to iterate over and pass to getKeyPattern.
145
146
* @param getKeyPattern Function used to turn each of the keys into a regex.
146
147
* @param formatValue Formats the value that will replace any matches of the pattern returned by
147
148
* `getKeyPattern`.
@@ -183,15 +184,15 @@ function insertUseStatement(content: string, importPath: string, namespace: stri
183
184
/** Formats a migration key as a Sass mixin invocation. */
184
185
function mixinKeyFormatter ( namespace : string | null , name : string ) : RegExp {
185
186
// Note that adding a `(` at the end of the pattern would be more accurate, but mixin
186
- // invocations don't necessarily have to include the parantheses . We could add `[(;]`,
187
+ // invocations don't necessarily have to include the parentheses . We could add `[(;]`,
187
188
// but then we won't know which character to include in the replacement string.
188
189
return new RegExp ( `@include +${ escapeRegExp ( ( namespace ? namespace + '.' : '' ) + name ) } ` , 'g' ) ;
189
190
}
190
191
191
192
/** Returns a function that can be used to format a Sass mixin replacement. */
192
193
function getMixinValueFormatter ( namespace : string ) : ( name : string ) => string {
193
194
// Note that adding a `(` at the end of the pattern would be more accurate,
194
- // but mixin invocations don't necessarily have to include the parantheses .
195
+ // but mixin invocations don't necessarily have to include the parentheses .
195
196
return name => `@include ${ namespace } .${ name } ` ;
196
197
}
197
198
0 commit comments