File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [ Unreleased]
9
9
10
- - Nothing yet!
10
+ ### Fixed
11
+
12
+ - Escape special characters in resolved content base paths ([ #9650 ] ( https://github.com/tailwindlabs/tailwindcss/pull/9650 ) )
11
13
12
14
## [ 3.2.1] - 2022-10-21
13
15
Original file line number Diff line number Diff line change @@ -94,17 +94,18 @@ function parseFilePath(filePath, ignore) {
94
94
* @returns {ContentPath }
95
95
*/
96
96
function resolveGlobPattern ( contentPath ) {
97
- contentPath . pattern = contentPath . glob
98
- ? `${ contentPath . base } /${ contentPath . glob } `
99
- : contentPath . base
100
-
101
- contentPath . pattern = contentPath . ignore ? `!${ contentPath . pattern } ` : contentPath . pattern
102
-
103
97
// This is required for Windows support to properly pick up Glob paths.
104
98
// Afaik, this technically shouldn't be needed but there's probably
105
99
// some internal, direct path matching with a normalized path in
106
100
// a package which can't handle mixed directory separators
107
- contentPath . pattern = normalizePath ( contentPath . pattern )
101
+ let base = normalizePath ( contentPath . base )
102
+
103
+ // If the user's file path contains any special characters (like parens) for instance fast-glob
104
+ // is like "OOOH SHINY" and treats them as such. So we have to escape the base path to fix this
105
+ base = fastGlob . escapePath ( base )
106
+
107
+ contentPath . pattern = contentPath . glob ? `${ base } /${ contentPath . glob } ` : base
108
+ contentPath . pattern = contentPath . ignore ? `!${ contentPath . pattern } ` : contentPath . pattern
108
109
109
110
return contentPath
110
111
}
You can’t perform that action at this time.
0 commit comments