add typings script to prepack

This commit is contained in:
Yanzhen Yu
2021-02-27 18:00:56 +08:00
parent 4bf3073d80
commit cf5c34592e
2 changed files with 6 additions and 2 deletions

View File

@@ -165,7 +165,11 @@ export function transformAttribute(
// relative path in attribute
if (name === 'src' || ((name === 'href' || name === 'xlink:href') && value)) {
return absoluteToDoc(doc, value);
} else if (name === 'background' && value && (tagName === 'table' || tagName == 'td' || tagName == 'th')) {
} else if (
name === 'background' &&
value &&
(tagName === 'table' || tagName === 'td' || tagName === 'th')
) {
return absoluteToDoc(doc, value);
} else if (name === 'srcset' && value) {
return getAbsoluteSrcsetString(doc, value);