@@ -99,7 +99,7 @@ define(function (require, exports, module) {
9999 * This function is to make sure file extensions are properly formatted with leading dots
100100 * because user may provide values in not very consistent manner, we need to handle all those cases
101101 * For ex: what we expect: `.js, .html, .css`
102- * what user may provide: `js, html, css` or: `js html css` or `.js.html.css` etc
102+ * what user may provide: `js, html, css` or: `js html css` etc
103103 *
104104 * This function processes file extensions in various formats and ensures they:
105105 * - Have a leading dot (if not empty or "all")
@@ -139,28 +139,12 @@ define(function (require, exports, module) {
139139 . filter ( ( ext ) => ext !== "" ) // Remove empty entries
140140 . join ( ", " ) ;
141141 } else {
142- // Step 3: handle multiple extensions joined by dots (e.g., ".less.css.js")
143- // Only process if multiple dots exist and no commas
144- const dotCount = ( extension . match ( / \. / g) || [ ] ) . length ;
145- if ( dotCount > 1 ) {
146- // remove the leading dot if present for consistent processing
147- const extensionWithoutLeadingDot = extension . startsWith ( "." ) ? extension . substring ( 1 ) : extension ;
148-
149- // split by dot, filter empty parts, add leading dot to each part
150- const parts = extensionWithoutLeadingDot
151- . split ( "." )
152- . filter ( ( part ) => part !== "" )
153- . map ( ( part ) => "." + part ) ;
154-
155- result = parts . join ( ", " ) ;
142+ // Step 3: Handle single extension
143+ if ( extension === "." ) {
144+ result = "" ; // remove standalone dot
156145 } else {
157- // Step 4: Handle single extension
158- if ( extension === "." ) {
159- result = "" ; // remove standalone dot
160- } else {
161- // Add leading dot if missing
162- result = extension . startsWith ( "." ) ? extension : "." + extension ;
163- }
146+ // Add leading dot if missing
147+ result = extension . startsWith ( "." ) ? extension : "." + extension ;
164148 }
165149 }
166150
0 commit comments