kopia lustrzana https://github.com/learn-awesome/learndb
preserve body tag
rodzic
5b3c6578aa
commit
7de9f17ec3
|
@ -20,6 +20,9 @@ function simplifyContent(content) {
|
||||||
// Preserve the title tag and its content
|
// Preserve the title tag and its content
|
||||||
let title = content.match(/<title.*?>(.*?)<\/title>/i);
|
let title = content.match(/<title.*?>(.*?)<\/title>/i);
|
||||||
title = title ? title[1] : '';
|
title = title ? title[1] : '';
|
||||||
|
// Preserve the title tag and its content
|
||||||
|
let body = content.match(/<body.*?>(.*?)<\/body>/i);
|
||||||
|
body = body ? body[1] : '';
|
||||||
|
|
||||||
// Extract the body content, if present
|
// Extract the body content, if present
|
||||||
let bodyContent = '';
|
let bodyContent = '';
|
||||||
|
|
Ładowanie…
Reference in New Issue