saminsohag

fixed block components rendering inside table.

{
"cSpell.words": [
"cupertino"
]
}
\ No newline at end of file
... ...
## 1.0.17
* Bloc components rendering inside table.
## 1.0.16
* `IndentMd` and `BlockQuote` fixed.
... ...
... ... @@ -383,8 +383,8 @@ This document was created to test the robustness of Markdown parsers and to ensu
Expanded(
child: ListView(
children: [
AnimatedBuilder(
animation: _controller,
ListenableBuilder(
listenable: _controller,
builder: (context, _) {
return Container(
padding: const EdgeInsets.all(8),
... ...
... ... @@ -86,6 +86,14 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_highlight:
dependency: transitive
description:
name: flutter_highlight
sha256: "7b96333867aa07e122e245c033b8ad622e4e3a42a1a2372cbb098a2541d8782c"
url: "https://pub.dev"
source: hosted
version: "0.7.0"
flutter_lints:
dependency: "direct dev"
description:
... ... @@ -127,6 +135,14 @@ packages:
relative: true
source: path
version: "1.0.16"
highlight:
dependency: transitive
description:
name: highlight
sha256: "5353a83ffe3e3eca7df0abfb72dcf3fa66cc56b953728e7113ad4ad88497cf21"
url: "https://pub.dev"
source: hosted
version: "0.7.0"
http:
dependency: transitive
description:
... ...
... ... @@ -72,7 +72,13 @@ class _CodeFieldState extends State<CodeField> {
SingleChildScrollView(
scrollDirection: Axis.horizontal,
padding: const EdgeInsets.all(16),
child: Text(widget.codes),
child: Text(
widget.codes,
style: TextStyle(
fontFamily: 'JetBrainsMono',
package: "gpt_markdown",
),
),
),
],
),
... ...
... ... @@ -24,6 +24,7 @@ class CustomRb extends StatelessWidget {
return Directionality(
textDirection: textDirection,
child: Row(
mainAxisSize: MainAxisSize.min,
textBaseline: TextBaseline.alphabetic,
crossAxisAlignment: CrossAxisAlignment.baseline,
children: [
... ... @@ -44,7 +45,7 @@ class CustomRb extends StatelessWidget {
),
),
),
Expanded(child: child),
Flexible(child: child),
],
),
);
... ... @@ -75,6 +76,7 @@ class CustomCb extends StatelessWidget {
return Directionality(
textDirection: textDirection,
child: Row(
mainAxisSize: MainAxisSize.min,
textBaseline: TextBaseline.alphabetic,
crossAxisAlignment: CrossAxisAlignment.baseline,
children: [
... ... @@ -90,7 +92,7 @@ class CustomCb extends StatelessWidget {
),
),
),
Expanded(child: child),
Flexible(child: child),
],
),
);
... ...
... ... @@ -38,6 +38,7 @@ class UnorderedListView extends StatelessWidget {
return Directionality(
textDirection: textDirection,
child: Row(
mainAxisSize: MainAxisSize.min,
textBaseline: TextBaseline.alphabetic,
crossAxisAlignment: CrossAxisAlignment.baseline,
children: [
... ... @@ -63,7 +64,7 @@ class UnorderedListView extends StatelessWidget {
),
),
),
Expanded(child: child),
Flexible(child: child),
],
),
);
... ... @@ -104,6 +105,7 @@ class OrderedListView extends StatelessWidget {
return Directionality(
textDirection: textDirection,
child: Row(
mainAxisSize: MainAxisSize.min,
textBaseline: TextBaseline.alphabetic,
crossAxisAlignment: CrossAxisAlignment.baseline,
children: [
... ... @@ -111,7 +113,7 @@ class OrderedListView extends StatelessWidget {
padding: EdgeInsetsDirectional.only(start: padding, end: spacing),
child: Text.rich(TextSpan(text: no), style: _style),
),
Expanded(child: child),
Flexible(child: child),
],
),
);
... ...
No preview for this file type
... ... @@ -112,7 +112,8 @@ abstract class BlockMd extends MarkdownComponent {
bool get inline => false;
@override
RegExp get exp => RegExp(r'^\ *?' + expString, dotAll: true, multiLine: true);
RegExp get exp =>
RegExp(r'^\ *?' + expString + r"$", dotAll: true, multiLine: true);
String get expString;
... ... @@ -134,7 +135,10 @@ abstract class BlockMd extends MarkdownComponent {
child: child,
);
}
child = Row(children: [Flexible(child: child)]);
child = Row(
mainAxisSize: MainAxisSize.min,
children: [Flexible(child: child)],
);
return WidgetSpan(
child: child,
alignment: PlaceholderAlignment.baseline,
... ... @@ -164,6 +168,7 @@ class IndentMd extends BlockMd {
return Directionality(
textDirection: config.textDirection,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Flexible(
child: config.getRich(
... ... @@ -257,7 +262,7 @@ class NewLines extends InlineMd {
/// Horizontal line component
class HrLine extends BlockMd {
@override
String get expString => (r"(--)[-]+$");
String get expString => (r"⸻|((--)[-]+)$");
@override
Widget build(
BuildContext context,
... ... @@ -554,10 +559,8 @@ class StrikeMd extends InlineMd {
/// Italic text component
class ItalicMd extends InlineMd {
@override
RegExp get exp => RegExp(
r"(?<!\*)\*(?<!\s)(.+?)(?<!\s)\*(?!\*)|\_(?<!\s)(.+?)(?<!\s)\_",
dotAll: true,
);
RegExp get exp =>
RegExp(r"(?:(?<!\*)\*(?<!\s)(.+?)(?<!\s)\*(?!\*))", dotAll: true);
@override
InlineSpan span(
... ...
name: gpt_markdown
description: "Powerful Markdown & LaTeX Renderer for Flutter: Rich Text, Math, Tables, Links, and Text Selection. Ideal for ChatGPT, Gemini, and more."
version: 1.0.16
version: 1.0.17
homepage: https://github.com/Infinitix-LLC/gpt_markdown
environment:
... ... @@ -18,6 +18,10 @@ dev_dependencies:
flutter_lints: ^5.0.0
flutter:
fonts:
- family: JetBrainsMono
fonts:
- asset: lib/fonts/JetBrainsMono-Regular.ttf
topics:
- markdown
... ...