Don’t add spaces around raw / that are preceded by numbers (#8688)

* Don’t add spaces around raw `/` that are preceded by numbers

* Update changelog
This commit is contained in:
Jordan Pittman 2022-06-20 10:49:55 -04:00 • committed by GitHub
parent c5e7857362
commit 00af2e8947
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 112 additions and 45 deletions

View file

@ -49,9 +49,7 @@ export function normalize(value, isRoot = true) {
)
})
// Add spaces around some operators not inside calc() that do not follow an operator
// or '('.
return value.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([\/])/g, '$1 $2 ')
return value
}
export function url(value) {