Make scrunitizer happier
This commit is contained in:
parent
38788e0c7e
commit
70ad01550b
|
|
@ -96,13 +96,13 @@ class Html
|
||||||
$attributes = $node->attributes; // get all the attributes(eg: id, class)
|
$attributes = $node->attributes; // get all the attributes(eg: id, class)
|
||||||
|
|
||||||
foreach ($attributes as $attribute) {
|
foreach ($attributes as $attribute) {
|
||||||
$val = trim($attribute->value);
|
$val = $attribute->value;
|
||||||
switch (strtolower($attribute->name)) {
|
switch (strtolower($attribute->name)) {
|
||||||
case 'style':
|
case 'style':
|
||||||
$styles = self::parseStyle($attribute, $styles);
|
$styles = self::parseStyle($attribute, $styles);
|
||||||
break;
|
break;
|
||||||
case 'align':
|
case 'align':
|
||||||
$styles['alignment'] = self::mapAlign($val);
|
$styles['alignment'] = self::mapAlign(trim($val));
|
||||||
break;
|
break;
|
||||||
case 'lang':
|
case 'lang':
|
||||||
$styles['lang'] = $val;
|
$styles['lang'] = $val;
|
||||||
|
|
@ -121,7 +121,7 @@ class Html
|
||||||
break;
|
break;
|
||||||
case 'cellspacing':
|
case 'cellspacing':
|
||||||
// tables e.g. <table cellspacing="2">, where "2" = 2px (always pixels)
|
// tables e.g. <table cellspacing="2">, where "2" = 2px (always pixels)
|
||||||
$val = intval($attribute->value).'px';
|
$val = intval($val).'px';
|
||||||
$styles['cellSpacing'] = Converter::cssToTwip($val);
|
$styles['cellSpacing'] = Converter::cssToTwip($val);
|
||||||
break;
|
break;
|
||||||
case 'bgcolor':
|
case 'bgcolor':
|
||||||
|
|
@ -475,7 +475,8 @@ class Html
|
||||||
if ($start > 0) {
|
if ($start > 0) {
|
||||||
$level->setStart($start);
|
$level->setStart($start);
|
||||||
}
|
}
|
||||||
if ($type && !!($type = self::mapListType($type))) {
|
$type = $type ? self::mapListType($type) : null;
|
||||||
|
if ($type) {
|
||||||
$level->setFormat($type);
|
$level->setFormat($type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue