From c81e539a760efeac4dec4d797484edcb4b3ec4bc Mon Sep 17 00:00:00 2001
From: Vishesh Handa <me@vhanda.in>
Date: Mon, 2 Aug 2021 11:11:10 +0200
Subject: [PATCH] StripMarkdownFormatting: Only consider '* ' as lists

If we let the space be optional then this picks up bold/italics as well.
Ideally, the stripMarkdown formatting could be made smarter, but I would
prefer to just rid of it in the future, and use the proper markdown
parser.

The only thing that is stopping me right now is performance. So in the
future when the stripped version is cached, this should be fine.

Fixes #420
---
 lib/utils/markdown.dart | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/utils/markdown.dart b/lib/utils/markdown.dart
index 6237afaf..0ad65ae5 100644
--- a/lib/utils/markdown.dart
+++ b/lib/utils/markdown.dart
@@ -27,15 +27,15 @@ String replaceMarkdownChars(String line) {
   line = line.replaceFirst('- [x]', '☑');
   line = line.replaceFirst('- [X]', '☑');
 
-  line = replaceListChar(line, '*');
-  line = replaceListChar(line, '-');
-  line = replaceListChar(line, '+');
+  line = replaceListChar(line, '* ');
+  line = replaceListChar(line, '- ');
+  line = replaceListChar(line, '+ ');
 
   return line;
 }
 
 String replaceListChar(String line, String char) {
-  const String bullet = '•';
+  const String bullet = '• ';
 
   var starPos = line.indexOf(char);
   if (starPos == 0) {