Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
gpt_markdown
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
saminsohag
2025-03-13 12:53:43 +0600
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8bb832fd207dbfb298e228c0f16700c2aa4342bb
8bb832fd
1 parent
4a4e737e
fied issue #49
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
7 deletions
CHANGELOG.md
example/macos/Runner/DebugProfile.entitlements
example/macos/Runner/Release.entitlements
lib/markdown_component.dart
pubspec.yaml
CHANGELOG.md
View file @
8bb832f
## 1.0.13
*
Fixed issue
[
#49
](
https://github.com/Infinitix-LLC/gpt_markdown/issues/49
)
.
## 1.0.12
*
imageBuilder parameter added.
...
...
example/macos/Runner/DebugProfile.entitlements
View file @
8bb832f
...
...
@@ -8,6 +8,8 @@
<true/>
<key>
com.apple.security.network.server
</key>
<true/>
<key>
com.apple.security.network.client
</key>
<true/>
<key>
com.apple.security.files.user-selected.read-write
</key>
<true/>
</dict>
...
...
example/macos/Runner/Release.entitlements
View file @
8bb832f
...
...
@@ -4,6 +4,8 @@
<dict>
<key>
com.apple.security.app-sandbox
</key>
<true/>
<key>
com.apple.security.network.client
</key>
<true/>
<key>
com.apple.security.files.user-selected.read-write
</key>
<true/>
</dict>
...
...
lib/markdown_component.dart
View file @
8bb832f
...
...
@@ -7,6 +7,7 @@ abstract class MarkdownComponent {
NewLines
(),
IndentMd
(),
ImageMd
(),
ATagMd
(),
TableMd
(),
HTag
(),
UnOrderedList
(),
...
...
@@ -14,14 +15,13 @@ abstract class MarkdownComponent {
RadioButtonMd
(),
CheckBoxMd
(),
HrLine
(),
StrikeMd
(),
BoldMd
(),
ItalicMd
(),
LatexMath
(),
LatexMathMultiLine
(),
ImageMd
(),
HighlightedText
(),
StrikeMd
(),
BoldMd
(),
ItalicMd
(),
ATagMd
(),
SourceTag
(),
];
...
...
@@ -44,7 +44,13 @@ abstract class MarkdownComponent {
onMatch:
(
p0
)
{
String
element
=
p0
[
0
]
??
""
;
for
(
var
each
in
components
)
{
if
(
each
.
exp
.
hasMatch
(
element
))
{
var
p
=
each
.
exp
.
pattern
;
var
exp
=
RegExp
(
'^
$p
'
,
multiLine:
each
.
exp
.
isMultiLine
,
dotAll:
each
.
exp
.
isDotAll
,
);
if
(
exp
.
hasMatch
(
element
))
{
if
(
each
.
inline
)
{
spans
.
add
(
each
.
span
(
context
,
element
,
config
));
}
else
{
...
...
@@ -127,7 +133,7 @@ abstract class BlockMd extends MarkdownComponent {
var
child
=
build
(
context
,
text
,
config
);
length
=
min
(
length
,
4
);
if
(
length
>
0
)
{
child
=
UnorderedListView
(
spacing:
length
*
6
.0
,
child:
child
);
child
=
UnorderedListView
(
spacing:
length
*
1
.0
,
child:
child
);
}
return
WidgetSpan
(
child:
child
,
alignment:
PlaceholderAlignment
.
middle
);
}
...
...
@@ -420,6 +426,7 @@ class BoldMd extends InlineMd {
final
GptMarkdownConfig
config
,
)
{
var
match
=
exp
.
firstMatch
(
text
.
trim
());
print
(
match
);
var
conf
=
config
.
copyWith
(
style:
config
.
style
?.
copyWith
(
fontWeight:
FontWeight
.
bold
)
??
...
...
pubspec.yaml
View file @
8bb832f
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.1
2
version
:
1.0.1
3
homepage
:
https://github.com/Infinitix-LLC/gpt_markdown
environment
:
...
...
Please
register
or
login
to post a comment