From dc33abe0392295f18075f4bbf695f1259c27732d Mon Sep 17 00:00:00 2001 From: Joao Pedro Silva Bianco <65260601+JoaoBianco@users.noreply.github.com> Date: Thu, 24 Oct 2024 09:05:30 -0300 Subject: [PATCH] feat: add empty space entity to be removed on removeHtmlTags pipe (#94) --- src/package.json | 2 +- src/pipes/remove-html-tags/remove-html-tags.pipe.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/package.json b/src/package.json index a1307f9..c83b981 100644 --- a/src/package.json +++ b/src/package.json @@ -1,6 +1,6 @@ { "name": "@squidit/ngx-css", - "version": "1.3.59", + "version": "1.3.60", "peerDependencies": { "@angular/common": ">=15.0.0", "@angular/cdk": ">=15.0.0", diff --git a/src/pipes/remove-html-tags/remove-html-tags.pipe.ts b/src/pipes/remove-html-tags/remove-html-tags.pipe.ts index 3740495..108f30f 100644 --- a/src/pipes/remove-html-tags/remove-html-tags.pipe.ts +++ b/src/pipes/remove-html-tags/remove-html-tags.pipe.ts @@ -24,7 +24,7 @@ export class RemoveHtmlTagsPipe implements PipeTransform { if (value == null) { return '' } - const regex = /<\/?[^>]+(>|$)/g + const regex = /<\/?[^>]+(>|$)| /g return value.replace(regex, '') } }