|
|
@ -84,17 +84,9 @@ $.cleanup = () => {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$.load = (html, opts = {}, returnHtml = false) => {
|
|
|
|
$.load = (html, opts = {}, returnHtml = false) => {
|
|
|
|
const { normalizeWhitespace } = opts;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!html) {
|
|
|
|
if (!html) {
|
|
|
|
html = $.cloneHtml();
|
|
|
|
html = $.cloneHtml();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (normalizeWhitespace) {
|
|
|
|
|
|
|
|
if (typeof html === 'string') {
|
|
|
|
|
|
|
|
html = html.replace(/[\s\n\r]+/g, ' ');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
html = $('<container />').html(html);
|
|
|
|
html = $('<container />').html(html);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|