Skip to content

Commit

Permalink
[Oxide] Ensure generated tailwind.config.js file is formatted prope…
Browse files Browse the repository at this point in the history
…rly (#11221)

* ensure beginning `\n` is not removed

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

* update changelog
  • Loading branch information
RobinMalfait authored May 12, 2023
1 parent 764f6a1 commit 0e171fd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/cli/init/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/oxide/cli/init/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0e171fd

Please sign in to comment.