Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update packages/@tailwindcss-upgrade/src/template/candidates.ts
Co-authored-by: Jordan Pittman <[email protected]>
  • Loading branch information
philipp-spiess and thecrypticace authored Sep 25, 2024
commit d26eacb9e6a7f1e2ee51bac79bd2e3d5078e647f
4 changes: 2 additions & 2 deletions packages/@tailwindcss-upgrade/src/template/candidates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ function printVariant(variant: Variant) {

function escapeArbitrary(input: string) {
return input
.replaceAll(String.raw`_`, String.raw`\_`) // Escape underscores to keep them as-is
.replaceAll(String.raw` `, String.raw`_`) // Replace spaces with underscores
.replaceAll('_', String.raw`\_`) // Escape underscores to keep them as-is
.replaceAll(' ', '_') // Replace spaces with underscores
}

export function replaceCandidateInContent(
Expand Down