HTML Reader : Override inline style on HTML attribute for table

This commit is contained in:
Progi1984 2022-09-25 21:18:39 +02:00
parent 02ccca1551
commit f8d0b2ad87
3 changed files with 412 additions and 380 deletions

1
.gitignore vendored
View File

@ -21,3 +21,4 @@ phpword.ini
/.project /.project
/nbproject /nbproject
/.php_cs.cache /.php_cs.cache
/.phpunit.result.cache

View File

@ -107,10 +107,6 @@ class Html
foreach ($attributes as $attribute) { foreach ($attributes as $attribute) {
$val = $attribute->value; $val = $attribute->value;
switch (strtolower($attribute->name)) { switch (strtolower($attribute->name)) {
case 'style':
$styles = self::parseStyle($attribute, $styles);
break;
case 'align': case 'align':
$styles['alignment'] = self::mapAlign(trim($val)); $styles['alignment'] = self::mapAlign(trim($val));
@ -152,6 +148,11 @@ class Html
break; break;
} }
} }
$attributeStyle = $attributes->getNamedItem('style');
if ($attributeStyle) {
$styles = self::parseStyle($attributeStyle, $styles);
}
} }
return $styles; return $styles;

File diff suppressed because one or more lines are too long