Archived
Public Access
Test for black fill and stroke style removal
This commit is contained in:
1 parent
3e4b948569
commit
27dfa0af2e
3 files changed
+21
-2
No files matched your search
@@ -179,12 +179,12 @@ final class IconExtension extends AbstractExtension
|
||||
|
||||
private function removeBlackStrokeAttributes(string $content): string
|
||||
{
|
||||
return preg_replace('/stroke="\s*(#0{6}|#000|rgb\(\s*0,\s*0,\s*0\s*\)|black)\s*"/', '', $content);
|
||||
return preg_replace('/stroke(=|:)"?\s*(#0{6}|#000|rgb\(\s*0,\s*0,\s*0\s*\)|black)\s*"?/', '', $content);
|
||||
}
|
||||
|
||||
private function removeBlackFillAttributes(string $content): string
|
||||
{
|
||||
return preg_replace('/fill="\s*(#0{6}|#000|rgb\(\s*0,\s*0,\s*0\s*\)|black)\s*"/', '', $content);
|
||||
return preg_replace('/fill(=|:)"?\s*(#0{6}|#000|rgb\(\s*0,\s*0,\s*0\s*\)|black)\s*"?/', '', $content);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user