@socialgouv/fiches-travail-data-types 4.533.0 → 4.534.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -151,9 +151,12 @@ function parseDom(dom, id, url) {
|
|
|
151
151
|
const [year, month, day] = dateRaw.getAttribute("content").split("-");
|
|
152
152
|
let intro = $(article, ".main-article__chapo") || "";
|
|
153
153
|
intro =
|
|
154
|
-
intro &&
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
intro &&
|
|
155
|
+
intro.innerHTML
|
|
156
|
+
.replace(/\n/g, "")
|
|
157
|
+
.replace(/\s+/g, " ")
|
|
158
|
+
.trim()
|
|
159
|
+
.replace(/<script[^>]*>([\s\S]*?)<\/script>/g, "");
|
|
157
160
|
const description = $(dom.window.document, "meta[name=description]")?.getAttribute("content") ??
|
|
158
161
|
"";
|
|
159
162
|
const sections = [];
|