Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

feat: change regexpresion

Nevo David420a844d1b72
diff --git a/apps/frontend/tsconfig.json b/apps/frontend/tsconfig.json
index 9e693f7e6..69f5acb64 100644
--- a/apps/frontend/tsconfig.json
+++ b/apps/frontend/tsconfig.json
@@ -11,6 +11,7 @@
"resolveJsonModule": true,
"isolatedModules": true,
"incremental": true,
+ "lib": ["es2020", "dom"],
"plugins": [
{
"name": "next"
diff --git a/libraries/helpers/src/utils/strip.html.validation.ts b/libraries/helpers/src/utils/strip.html.validation.ts
index 7ee126286..3745c7b31 100644
--- a/libraries/helpers/src/utils/strip.html.validation.ts
+++ b/libraries/helpers/src/utils/strip.html.validation.ts
@@ -177,15 +177,14 @@ export const stripHtmlValidation = (
.replace(/<ul>/, "\n<ul>")
.replace(/<\/ul>\n/, "</ul>")
.replace(
- /<li.*?>(.*?)<\/li.*?>/gms,
+ /<li.*?>([.\s\S]*?)<\/li.*?>/gm,
(match, p1) => {
- return `<li><p>- ${p1.replace(/\n/gms, '')}\n</p></li>`;
+ return `<li><p>- ${p1.replace(/\n/gm, '')}\n</p></li>`;
}
)
)
);
- console.log(processedHtml);
return striptags(processedHtml, ['h1', 'h2', 'h3']);
}