Improvement for #184

This commit is contained in:
the-djmaze 2022-02-15 10:36:01 +01:00
parent e2c171f302
commit ec23b61e14

View file

@ -170,9 +170,11 @@ export const
else if ('TABLE' === name && hasAttribute('width')) { else if ('TABLE' === name && hasAttribute('width')) {
value = getAttribute('width'); value = getAttribute('width');
delAttribute('width'); if (!value.includes('%')) {
oStyle.maxWidth = value + (/^[0-9]+$/.test(value) ? 'px' : ''); delAttribute('width');
oStyle.removeProperty('width'); oStyle.maxWidth = value + 'px';
oStyle.removeProperty('width');
}
} }
else if ('A' === name) { else if ('A' === name) {