You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Remove duplicates, so that we can detect proper unique types for each plugin.
266
+
for(letpluginTypesoftypesPerPlugin){
267
+
for(lettypeofpluginTypes){
268
+
letremoveFromOwnGroup=false
269
+
270
+
for(letotherGroupoftypesPerPlugin){
271
+
if(pluginTypes===otherGroup)continue
272
+
273
+
if(otherGroup.has(type)){
274
+
otherGroup.delete(type)
275
+
removeFromOwnGroup=true
276
+
}
277
+
}
278
+
279
+
if(removeFromOwnGroup)pluginTypes.delete(type)
280
+
}
281
+
}
282
+
283
+
letmessages=[]
284
+
285
+
for(let[idx,group]oftypesPerPlugin.entries()){
286
+
for(lettypeofgroup){
287
+
letrules=matches[idx]
288
+
.map(([,rule])=>rule)
289
+
.flat()
290
+
.map((rule)=>
291
+
rule
292
+
.toString()
293
+
.split('\n')
294
+
.slice(1,-1)// Remove selector and closing '}'
295
+
.map((line)=>line.trim())
296
+
.map((x)=>` ${x}`)// Re-indent
297
+
.join('\n')
298
+
)
299
+
.join('\n\n')
300
+
301
+
messages.push(
302
+
` - Replace "${candidate}" with "${candidate.replace(
303
+
'[',
304
+
`[${type}:`
305
+
)}" for:\n${rules}\n`
306
+
)
307
+
break
308
+
}
309
+
}
310
+
311
+
log.warn([
312
+
// TODO: Update URL
313
+
`The class "${candidate}" is ambiguous and matches multiple utilities. Use a type hint (https://tailwindcss.com/docs/just-in-time-mode#ambiguous-values) to fix this.`,
314
+
'',
315
+
...messages,
316
+
`If this is just part of your content and not a class, replace it with "${candidate
317
+
.replace('[','[')
318
+
.replace(']',']')}" to silence this warning.`,
319
+
])
320
+
continue
321
+
}
322
+
323
+
matches=applyPrefix(matches.flat(),context)
251
324
252
325
if(important){
253
326
matches=applyImportant(matches,context)
@@ -317,4 +390,8 @@ function generateRules(candidates, context) {
0 commit comments