Skip to content

Commit

Permalink
TW-638: fix multiple linebreaks to html
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian KOUNE committed Oct 27, 2023
1 parent d3fd4db commit adf123c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/src/utils/markdown.dart
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ String markdown(
Map<String, Map<String, String>> Function()? getEmotePacks,
String? Function(String)? getMention,
}) {
// Workaround for LinebreakSyntax not working with multiple newlines
text = text.replaceAll(RegExp(r'\n{2,}'), '<br /><br />');

var ret = markdownToHtml(
text,
extensionSet: ExtensionSet.commonMark,
Expand Down

0 comments on commit adf123c

Please sign in to comment.