saminsohag

fied issue #49

  1 +## 1.0.13
  2 +
  3 +* Fixed issue [#49](https://github.com/Infinitix-LLC/gpt_markdown/issues/49).
  4 +
1 ## 1.0.12 5 ## 1.0.12
2 6
3 * imageBuilder parameter added. 7 * imageBuilder parameter added.
@@ -8,6 +8,8 @@ @@ -8,6 +8,8 @@
8 <true/> 8 <true/>
9 <key>com.apple.security.network.server</key> 9 <key>com.apple.security.network.server</key>
10 <true/> 10 <true/>
  11 + <key>com.apple.security.network.client</key>
  12 + <true/>
11 <key>com.apple.security.files.user-selected.read-write</key> 13 <key>com.apple.security.files.user-selected.read-write</key>
12 <true/> 14 <true/>
13 </dict> 15 </dict>
@@ -4,6 +4,8 @@ @@ -4,6 +4,8 @@
4 <dict> 4 <dict>
5 <key>com.apple.security.app-sandbox</key> 5 <key>com.apple.security.app-sandbox</key>
6 <true/> 6 <true/>
  7 + <key>com.apple.security.network.client</key>
  8 + <true/>
7 <key>com.apple.security.files.user-selected.read-write</key> 9 <key>com.apple.security.files.user-selected.read-write</key>
8 <true/> 10 <true/>
9 </dict> 11 </dict>
@@ -7,6 +7,7 @@ abstract class MarkdownComponent { @@ -7,6 +7,7 @@ abstract class MarkdownComponent {
7 NewLines(), 7 NewLines(),
8 IndentMd(), 8 IndentMd(),
9 ImageMd(), 9 ImageMd(),
  10 + ATagMd(),
10 TableMd(), 11 TableMd(),
11 HTag(), 12 HTag(),
12 UnOrderedList(), 13 UnOrderedList(),
@@ -14,14 +15,13 @@ abstract class MarkdownComponent { @@ -14,14 +15,13 @@ abstract class MarkdownComponent {
14 RadioButtonMd(), 15 RadioButtonMd(),
15 CheckBoxMd(), 16 CheckBoxMd(),
16 HrLine(), 17 HrLine(),
  18 + StrikeMd(),
  19 + BoldMd(),
  20 + ItalicMd(),
17 LatexMath(), 21 LatexMath(),
18 LatexMathMultiLine(), 22 LatexMathMultiLine(),
19 ImageMd(), 23 ImageMd(),
20 HighlightedText(), 24 HighlightedText(),
21 - StrikeMd(),  
22 - BoldMd(),  
23 - ItalicMd(),  
24 - ATagMd(),  
25 SourceTag(), 25 SourceTag(),
26 ]; 26 ];
27 27
@@ -44,7 +44,13 @@ abstract class MarkdownComponent { @@ -44,7 +44,13 @@ abstract class MarkdownComponent {
44 onMatch: (p0) { 44 onMatch: (p0) {
45 String element = p0[0] ?? ""; 45 String element = p0[0] ?? "";
46 for (var each in components) { 46 for (var each in components) {
47 - if (each.exp.hasMatch(element)) { 47 + var p = each.exp.pattern;
  48 + var exp = RegExp(
  49 + '^$p',
  50 + multiLine: each.exp.isMultiLine,
  51 + dotAll: each.exp.isDotAll,
  52 + );
  53 + if (exp.hasMatch(element)) {
48 if (each.inline) { 54 if (each.inline) {
49 spans.add(each.span(context, element, config)); 55 spans.add(each.span(context, element, config));
50 } else { 56 } else {
@@ -127,7 +133,7 @@ abstract class BlockMd extends MarkdownComponent { @@ -127,7 +133,7 @@ abstract class BlockMd extends MarkdownComponent {
127 var child = build(context, text, config); 133 var child = build(context, text, config);
128 length = min(length, 4); 134 length = min(length, 4);
129 if (length > 0) { 135 if (length > 0) {
130 - child = UnorderedListView(spacing: length * 6.0, child: child); 136 + child = UnorderedListView(spacing: length * 1.0, child: child);
131 } 137 }
132 return WidgetSpan(child: child, alignment: PlaceholderAlignment.middle); 138 return WidgetSpan(child: child, alignment: PlaceholderAlignment.middle);
133 } 139 }
@@ -420,6 +426,7 @@ class BoldMd extends InlineMd { @@ -420,6 +426,7 @@ class BoldMd extends InlineMd {
420 final GptMarkdownConfig config, 426 final GptMarkdownConfig config,
421 ) { 427 ) {
422 var match = exp.firstMatch(text.trim()); 428 var match = exp.firstMatch(text.trim());
  429 + print(match);
423 var conf = config.copyWith( 430 var conf = config.copyWith(
424 style: 431 style:
425 config.style?.copyWith(fontWeight: FontWeight.bold) ?? 432 config.style?.copyWith(fontWeight: FontWeight.bold) ??
1 name: gpt_markdown 1 name: gpt_markdown
2 description: "Powerful Markdown & LaTeX Renderer for Flutter: Rich Text, Math, Tables, Links, and Text Selection. Ideal for ChatGPT, Gemini, and more." 2 description: "Powerful Markdown & LaTeX Renderer for Flutter: Rich Text, Math, Tables, Links, and Text Selection. Ideal for ChatGPT, Gemini, and more."
3 -version: 1.0.12 3 +version: 1.0.13
4 homepage: https://github.com/Infinitix-LLC/gpt_markdown 4 homepage: https://github.com/Infinitix-LLC/gpt_markdown
5 5
6 environment: 6 environment: