[Oxide] Ensure generated tailwind.config.js file is formatted properly (#11221)

* ensure beginning `\n` is not removed

The `\s` regex includes newlines `\n`, but we only want leading spaces
to be removed.

* update changelog
This commit is contained in:
Robin Malfait 2023-05-13 00:15:30 +02:00 • committed by GitHub
parent 764f6a19d4
commit 0e171fd2dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -19,7 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add `aria-busy` utility ([#10966](https://github.com/tailwindlabs/tailwindcss/pull/10966))
- [Oxide] Use `lightningcss` for nesting and vendor prefixes in PostCSS plugin ([#10399](https://github.com/tailwindlabs/tailwindcss/pull/10399))
- Support `@import "tailwindcss"` using top-level `index.css` file ([#11205](https://github.com/tailwindlabs/tailwindcss/pull/11205))
- [Oxide] Automatically detect content paths when no `content` configuration is provided ([#11173](https://github.com/tailwindlabs/tailwindcss/pull/11173))
- [Oxide] Automatically detect content paths when no `content` configuration is provided ([#11173](https://github.com/tailwindlabs/tailwindcss/pull/11173), [#11221](https://github.com/tailwindlabs/tailwindcss/pull/11221))
### Changed

View file

@ -40,7 +40,7 @@ export function init(args) {
// Drop `content` in the oxide engine to promote auto content
if (__OXIDE__) {
stubContentsFile = stubContentsFile.replace(/\s*content: \[\],\n/, '')
stubContentsFile = stubContentsFile.replace(/ *content: \[\],\n/, '')
}
// Change colors import

View file

@ -38,7 +38,7 @@ export function init(args) {
// Drop `content` in the oxide engine to promote auto content
if (__OXIDE__) {
stubContentsFile = stubContentsFile.replace(/\s*content: \[\],\n/, '')
stubContentsFile = stubContentsFile.replace(/ *content: \[\],\n/, '')
}
// Change colors import