From e0f6fbdd9c78bc2115526ef557d83294a53484b6 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 12 Nov 2023 09:23:49 +0200 Subject: [PATCH] Email Templates and Reminders #606 --- lib/utils/markdown.dart | 7 +++---- lib/utils/super_editor/super_editor.dart | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/utils/markdown.dart b/lib/utils/markdown.dart index 2ddf55ff1..0c942c618 100644 --- a/lib/utils/markdown.dart +++ b/lib/utils/markdown.dart @@ -1,5 +1,5 @@ -/* // DELETE THIS FILE ONCE SUPER EDITOR IS UPDATED +// Note: using the standard function crashes with h1 tags import 'dart:convert'; @@ -468,7 +468,7 @@ class AttributedTextMarkdownSerializer extends AttributionVisitor { final linkMarker = _encodeLinkMarker(startingAttributions, AttributionVisitEvent.start); - _buffer + _buffer! ..write(linkMarker) ..write(markdownStyles); } @@ -488,7 +488,7 @@ class AttributedTextMarkdownSerializer extends AttributionVisitor { // +1 on end index because this visitor has inclusive indices // whereas substring() expects an exclusive ending index. - _buffer + _buffer! ..write(markdownStyles) ..write(linkMarker); } @@ -588,4 +588,3 @@ class _EmptyParagraphSyntax extends md.BlockSyntax { return md.Element('p', []); } } -*/ diff --git a/lib/utils/super_editor/super_editor.dart b/lib/utils/super_editor/super_editor.dart index 03320a85b..c4f0f17a1 100644 --- a/lib/utils/super_editor/super_editor.dart +++ b/lib/utils/super_editor/super_editor.dart @@ -1,8 +1,8 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:invoiceninja_flutter/utils/markdown.dart'; import 'package:invoiceninja_flutter/utils/super_editor/toolbar.dart'; import 'package:super_editor/super_editor.dart'; -import 'package:super_editor_markdown/super_editor_markdown.dart'; /// Example of a rich text editor. ///