完成全项目响应式审核与换机交接
This commit is contained in:
@@ -14,7 +14,7 @@ foreach ($file in $files) {
|
||||
$relative = $file.FullName.Substring($root.Length + 1).Replace('\', '/')
|
||||
$source = [System.IO.File]::ReadAllText($file.FullName, [System.Text.Encoding]::UTF8)
|
||||
foreach ($styleMatch in [regex]::Matches($source, '(?s)<style\b[^>]*>(?<css>.*?)</style>')) {
|
||||
$css = $styleMatch.Groups['css'].Value
|
||||
$css = [regex]::Replace($styleMatch.Groups['css'].Value, '(?m)^\s*@(use|forward|import)\b[^;]+;\s*', '')
|
||||
foreach ($rule in [regex]::Matches($css, '(?s)(?<selector>[^{}]+)\{(?<body>[^{}]*)\}')) {
|
||||
$body = [regex]::Replace($rule.Groups['body'].Value, '(?s)/\*.*?\*/', '')
|
||||
$positionMatches = [regex]::Matches($body, '(?im)(?<![-\w])position\s*:\s*(?<value>[^;{}]+?)\s*;')
|
||||
|
||||
Reference in New Issue
Block a user