mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Improve support for purging Haml even more
This commit is contained in:
parent
cdef9c8d4d
commit
9032ff33ed
@ -34,4 +34,6 @@ span.inline-grid.grid-cols-3(class="px-1.5")
|
||||
.flow-root
|
||||
.text-green-700.bg-green-100
|
||||
.text-left= content
|
||||
%samp= output
|
||||
%samp.font-mono{:data-foo => "bar"}= output
|
||||
.col-span-4[aria-hidden=true]
|
||||
.tracking-tight#headline
|
||||
|
||||
@ -54,6 +54,10 @@ function assertPurged(result) {
|
||||
expect(result.css).toContain('.text-green-700')
|
||||
expect(result.css).toContain('.bg-green-100')
|
||||
expect(result.css).toContain('.text-left')
|
||||
expect(result.css).toContain('.font-mono')
|
||||
expect(result.css).toContain('.col-span-4')
|
||||
expect(result.css).toContain('.tracking-tight')
|
||||
expect(result.css).toContain('.tracking-tight')
|
||||
}
|
||||
|
||||
test('purges unused classes', () => {
|
||||
|
||||
@ -67,7 +67,7 @@ export default function purgeUnusedUtilities(config) {
|
||||
const broadMatches = content.match(/[^<>"'`\s]*[^<>"'`\s:]/g) || []
|
||||
|
||||
// Capture classes within other delimiters like .block(class="w-1/2") in Pug
|
||||
const innerMatches = content.match(/[^<>"'`\s.()=%]*[^<>"'`\s.()=%:]/g) || []
|
||||
const innerMatches = content.match(/[^<>"'`\s.(){}\[\]#=%]*[^<>"'`\s.(){}\[\]#=%:]/g) || []
|
||||
|
||||
return broadMatches.concat(innerMatches)
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user