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. ///