Skip to content
Merged
Show file tree
Hide file tree
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
Apply suggestions from code review
Co-authored-by: Robin Malfait <[email protected]>
  • Loading branch information
philipp-spiess and RobinMalfait authored Sep 25, 2024
commit aec97643407b3944e49fc21725d0345fbd1f309b
4 changes: 2 additions & 2 deletions crates/node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ pub struct Scanner {
#[derive(Debug, Clone)]
#[napi(object)]
pub struct CandidateWithPosition {
// The candidate string
/// The candidate string
pub candidate: String,

// The position of the candidate inside the content file
/// The position of the candidate inside the content file
pub position: i64,
}

Expand Down
2 changes: 1 addition & 1 deletion packages/@tailwindcss-upgrade/src/template/candidates.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Scanner } from '@tailwindcss/oxide'
import stringByteSlice from 'string-byte-slice'
import { type Candidate, type Variant } from '../../../tailwindcss/src/candidate'
import type { Candidate, Variant } from '../../../tailwindcss/src/candidate'
import type { DesignSystem } from '../../../tailwindcss/src/design-system'

export async function extractCandidates(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import type { Candidate } from '../../../../tailwindcss/src/candidate'
//
// flex! md:block!
export function migrateImportant(candidate: Candidate): Candidate | null {
if (candidate.important) {
if (candidate.important && candidate.raw[candidate.raw.length - 1] !== '!') {
// The printCandidate function will already put the exclamation mark in the
// right place, so we just need to mark this candidate as requiring a
// migration.
Expand Down