Showing
1 changed file
with
5 additions
and
3 deletions
| @@ -58,8 +58,10 @@ class MdWidget extends StatelessWidget { | @@ -58,8 +58,10 @@ class MdWidget extends StatelessWidget { | ||
| 58 | .asMap(), | 58 | .asMap(), |
| 59 | ) | 59 | ) |
| 60 | .toList(); | 60 | .toList(); |
| 61 | - bool heading = | ||
| 62 | - RegExp(r"^\|.*?\|\n\|-[-\\ |]*?-\|\n").hasMatch(eachLn.trim()); | 61 | + bool heading = RegExp( |
| 62 | + r"^\|.*?\|\n\|-[-\\ |]*?-\|$", | ||
| 63 | + multiLine: true, | ||
| 64 | + ).hasMatch(eachLn.trim()); | ||
| 63 | int maxCol = 0; | 65 | int maxCol = 0; |
| 64 | for (final each in value) { | 66 | for (final each in value) { |
| 65 | if (maxCol < each.keys.length) { | 67 | if (maxCol < each.keys.length) { |
| @@ -100,7 +102,7 @@ class MdWidget extends StatelessWidget { | @@ -100,7 +102,7 @@ class MdWidget extends StatelessWidget { | ||
| 100 | (index) { | 102 | (index) { |
| 101 | var e = entry.value; | 103 | var e = entry.value; |
| 102 | String data = e[index] ?? ""; | 104 | String data = e[index] ?? ""; |
| 103 | - if (RegExp(r"^---+$").hasMatch(data.trim())) { | 105 | + if (RegExp(r"^--+$").hasMatch(data.trim())) { |
| 104 | return const SizedBox(); | 106 | return const SizedBox(); |
| 105 | } | 107 | } |
| 106 | return Center( | 108 | return Center( |
-
Please register or login to post a comment