Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_markupsFromElement(element) {
let { builder } = this;
let markups = [];
if (isTextNode(element)) {
return markups;
}
const tagName = normalizeTagName(element.tagName);
if (this._isValidMarkupForElement(tagName, element)) {
markups.push(builder.createMarkup(tagName, getAttributes(element)));
}
this._markupsFromElementStyle(element).forEach(
markup => markups.push(markup)
);
return markups;
}
_markupsFromElement(element) {
let { builder } = this;
let markups = [];
if (isTextNode(element)) {
return markups;
}
const tagName = normalizeTagName(element.tagName);
if (this._isValidMarkupForElement(tagName, element)) {
markups.push(builder.createMarkup(tagName, getAttributes(element)));
}
this._markupsFromElementStyle(element).forEach(
markup => markups.push(markup)
);
return markups;
}