Improve support for purging Haml templates

This commit is contained in:
Adam Wathan 2020-04-30 08:32:58 -04:00
parent 1c1836205e
commit cdef9c8d4d
3 changed files with 57 additions and 118 deletions

View file

@ -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)
},