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;