saminsohag

bug fixes

## 1.1.4
* 🔗 Fixed vertical alignment issue with link text rendering ([#92](https://github.com/Infinitix-LLC/gpt_markdown/issues/92))
* 📝 Resolved "null" rendering issue in ordered lists with multiple spaces and line breaks ([#89](https://github.com/Infinitix-LLC/gpt_markdown/issues/89))
* 🧹 Removed erroneous `trim()` from `CodeBlockMd` to preserve necessary whitespace in code blocks ([#99](https://github.com/Infinitix-LLC/gpt_markdown/issues/99))
* 🎨 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))
## 1.1.3
* Added `RadioGroup` widget for managing radio buttons.
... ...
... ... @@ -202,14 +202,15 @@ class HTag extends BlockMd {
var theme = GptMarkdownTheme.of(context);
var match = this.exp.firstMatch(text.trim());
var conf = config.copyWith(
style: [
style:
[
theme.h1,
theme.h2,
theme.h3,
theme.h4,
theme.h5,
theme.h6,
][match![1]!.length - 1]?.copyWith(color: config.style?.color),
][match![1]!.length - 1],
);
return config.getRich(
TextSpan(
... ... @@ -427,11 +428,11 @@ class OrderedList extends BlockMd {
String text,
final GptMarkdownConfig config,
) {
var match = this.exp.firstMatch(text.trim());
var match = this.exp.firstMatch(text);
var no = "${match?[1]}";
var no = "${match?[1]}".trim();
var child = MdWidget(context, "${match?[2]?.trim()}", true, config: config);
var child = MdWidget(context, "${match?[2]}".trim(), true, config: config);
return config.orderedListBuilder?.call(
context,
no,
... ... @@ -867,6 +868,8 @@ class ATagMd extends InlineMd {
WidgetSpan? child;
if (builder != null) {
child = WidgetSpan(
baseline: TextBaseline.alphabetic,
alignment: PlaceholderAlignment.baseline,
child: GestureDetector(
onTap: () => config.onLinkTap?.call(url, linkText),
child: builder(
... ... @@ -1188,7 +1191,7 @@ class CodeBlockMd extends BlockMd {
) {
String codes = this.exp.firstMatch(text)?[2] ?? "";
String name = this.exp.firstMatch(text)?[1] ?? "";
codes = codes.replaceAll(r"```", "").trim();
codes = codes.replaceAll(r"```", "");
bool closed = text.endsWith("```");
return config.codeBuilder?.call(context, name, codes, closed) ??
... ...
name: gpt_markdown
description: "Powerful Flutter Markdown & LaTeX Renderer: Rich Text, Math, Tables, Links, and Text Selection. Ideal for ChatGPT, Gemini, and more."
version: 1.1.3
version: 1.1.4
homepage: https://github.com/Infinitix-LLC/gpt_markdown
environment:
... ...