saminsohag

bug fixes

  1 +## 1.1.4
  2 +
  3 +* 🔗 Fixed vertical alignment issue with link text rendering ([#92](https://github.com/Infinitix-LLC/gpt_markdown/issues/92))
  4 +* 📝 Resolved "null" rendering issue in ordered lists with multiple spaces and line breaks ([#89](https://github.com/Infinitix-LLC/gpt_markdown/issues/89))
  5 +* 🧹 Removed erroneous `trim()` from `CodeBlockMd` to preserve necessary whitespace in code blocks ([#99](https://github.com/Infinitix-LLC/gpt_markdown/issues/99))
  6 +* 🎨 Fixed heading style customization issue where custom colors in heading styles were not being applied ([#95](https://github.com/Infinitix-LLC/gpt_markdown/issues/95))
  7 +
1 ## 1.1.3 8 ## 1.1.3
2 9
3 * Added `RadioGroup` widget for managing radio buttons. 10 * Added `RadioGroup` widget for managing radio buttons.
@@ -202,14 +202,15 @@ class HTag extends BlockMd { @@ -202,14 +202,15 @@ class HTag extends BlockMd {
202 var theme = GptMarkdownTheme.of(context); 202 var theme = GptMarkdownTheme.of(context);
203 var match = this.exp.firstMatch(text.trim()); 203 var match = this.exp.firstMatch(text.trim());
204 var conf = config.copyWith( 204 var conf = config.copyWith(
205 - style: [ 205 + style:
  206 + [
206 theme.h1, 207 theme.h1,
207 theme.h2, 208 theme.h2,
208 theme.h3, 209 theme.h3,
209 theme.h4, 210 theme.h4,
210 theme.h5, 211 theme.h5,
211 theme.h6, 212 theme.h6,
212 - ][match![1]!.length - 1]?.copyWith(color: config.style?.color), 213 + ][match![1]!.length - 1],
213 ); 214 );
214 return config.getRich( 215 return config.getRich(
215 TextSpan( 216 TextSpan(
@@ -427,11 +428,11 @@ class OrderedList extends BlockMd { @@ -427,11 +428,11 @@ class OrderedList extends BlockMd {
427 String text, 428 String text,
428 final GptMarkdownConfig config, 429 final GptMarkdownConfig config,
429 ) { 430 ) {
430 - var match = this.exp.firstMatch(text.trim()); 431 + var match = this.exp.firstMatch(text);
431 432
432 - var no = "${match?[1]}"; 433 + var no = "${match?[1]}".trim();
433 434
434 - var child = MdWidget(context, "${match?[2]?.trim()}", true, config: config); 435 + var child = MdWidget(context, "${match?[2]}".trim(), true, config: config);
435 return config.orderedListBuilder?.call( 436 return config.orderedListBuilder?.call(
436 context, 437 context,
437 no, 438 no,
@@ -867,6 +868,8 @@ class ATagMd extends InlineMd { @@ -867,6 +868,8 @@ class ATagMd extends InlineMd {
867 WidgetSpan? child; 868 WidgetSpan? child;
868 if (builder != null) { 869 if (builder != null) {
869 child = WidgetSpan( 870 child = WidgetSpan(
  871 + baseline: TextBaseline.alphabetic,
  872 + alignment: PlaceholderAlignment.baseline,
870 child: GestureDetector( 873 child: GestureDetector(
871 onTap: () => config.onLinkTap?.call(url, linkText), 874 onTap: () => config.onLinkTap?.call(url, linkText),
872 child: builder( 875 child: builder(
@@ -1188,7 +1191,7 @@ class CodeBlockMd extends BlockMd { @@ -1188,7 +1191,7 @@ class CodeBlockMd extends BlockMd {
1188 ) { 1191 ) {
1189 String codes = this.exp.firstMatch(text)?[2] ?? ""; 1192 String codes = this.exp.firstMatch(text)?[2] ?? "";
1190 String name = this.exp.firstMatch(text)?[1] ?? ""; 1193 String name = this.exp.firstMatch(text)?[1] ?? "";
1191 - codes = codes.replaceAll(r"```", "").trim(); 1194 + codes = codes.replaceAll(r"```", "");
1192 bool closed = text.endsWith("```"); 1195 bool closed = text.endsWith("```");
1193 1196
1194 return config.codeBuilder?.call(context, name, codes, closed) ?? 1197 return config.codeBuilder?.call(context, name, codes, closed) ??
1 name: gpt_markdown 1 name: gpt_markdown
2 description: "Powerful Flutter Markdown & LaTeX Renderer: Rich Text, Math, Tables, Links, and Text Selection. Ideal for ChatGPT, Gemini, and more." 2 description: "Powerful Flutter Markdown & LaTeX Renderer: Rich Text, Math, Tables, Links, and Text Selection. Ideal for ChatGPT, Gemini, and more."
3 -version: 1.1.3 3 +version: 1.1.4
4 homepage: https://github.com/Infinitix-LLC/gpt_markdown 4 homepage: https://github.com/Infinitix-LLC/gpt_markdown
5 5
6 environment: 6 environment: