fix(removeHtmlTagWithoutSpace): proper multiple tags slicing (#5)

* removeHtmlTagWithoutSpace

* pre release
This commit is contained in:
Indrawan I
2023-04-20 02:14:52 +07:00
committed by GitHub
parent 55e88b57d1
commit d2765c8e34
2 changed files with 2 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "lustpress",
"version": "1.6.2-alpha",
"version": "1.6.3-alpha",
"description": "RESTful and experimental API for PornHub and other porn sites, which official is lack even isn't exist.",
"main": "build/src/index.js",
"scripts": {

View File

@@ -72,6 +72,7 @@ class LustPress {
removeHtmlTagWithoutSpace(str: string): string {
str = str.replace(/(\r\n|\n|\r|\t)/gm, "");
str = str.replace(/\\/g, "");
str = str.replace(/\s+/g, " ");
return str.trim();
}