From db967b00bb9d2cfcd27eae19577c3ff52d3070a9 Mon Sep 17 00:00:00 2001 From: dab246 Date: Fri, 22 Jul 2022 18:33:24 +0700 Subject: [PATCH] TF-736 Remove string not use --- .../extensions/html_extension.dart | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/core/lib/presentation/extensions/html_extension.dart b/core/lib/presentation/extensions/html_extension.dart index 18329ec64..938c14e7b 100644 --- a/core/lib/presentation/extensions/html_extension.dart +++ b/core/lib/presentation/extensions/html_extension.dart @@ -3,21 +3,10 @@ extension HtmlExtension on String { static const String editorStartTags = '


'; - String removeFontSizeZeroPixel() => replaceAll(RegExp('font-size:0px;'), ''); - - String removeHeightZeroPixel() => replaceAll(RegExp('height:0px;'), ''); - - String removeWidthZeroPixel() => replaceAll(RegExp('width:0px;'), ''); - - String removeMaxWidthZeroPixel() => replaceAll(RegExp('max-width:0px;'), ''); - - String removeMaxHeightZeroPixel() => replaceAll(RegExp('max-height:0px;'), ''); - - String changeStyleBackground() => replaceAll(RegExp('background:'), 'background-color:'); - - String addBorderLefForBlockQuote() => replaceAll(RegExp(' attribute != null ? '<$tag $attribute>$this' : '<$tag>$this'; + String addBlockTag(String tag, {String? attribute}) => + attribute != null + ? '<$tag $attribute>$this' + : '<$tag>$this'; String append(String value) => this + value;