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
2024-07-11 05:45:34 +0600
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
06979608b481e4f809ca511c92ca8e4643aaa376
06979608
1 parent
20055bb1
some minor changes
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
15 deletions
gpt_markdown/lib/markdown_component.dart
gpt_markdown/lib/markdown_component.dart
View file @
0697960
...
...
@@ -540,7 +540,7 @@ class OrderedList extends BlockMd {
class
HighlightedText
extends
InlineMd
{
@override
RegExp
get
exp
=>
RegExp
(
r"`
.*?
`"
);
RegExp
get
exp
=>
RegExp
(
r"`
(.+?)
`"
);
@override
InlineSpan
span
(
...
...
@@ -556,12 +556,13 @@ class HighlightedText extends InlineMd {
final
Widget
Function
(
BuildContext
context
,
String
name
,
String
code
)?
codeBuilder
,
)
{
var
match
=
exp
.
firstMatch
(
text
.
trim
());
return
TextSpan
(
text:
text
,
text:
match
?[
1
]
,
style:
style
?.
copyWith
(
fontWeight:
FontWeight
.
bold
,
background:
Paint
()
..
color
=
Theme
.
of
(
context
).
colorScheme
.
surfaceContainerHighest
..
color
=
Theme
.
of
(
context
).
colorScheme
.
onInverseSurface
..
strokeCap
=
StrokeCap
.
round
..
strokeJoin
=
StrokeJoin
.
round
,
)
??
...
...
@@ -823,21 +824,19 @@ class SourceTag extends InlineMd {
// baseline: TextBaseline.alphabetic,
child:
Padding
(
padding:
const
EdgeInsets
.
all
(
2
),
child:
Container
(
child:
SizedBox
(
width:
20
,
height:
20
,
decoration:
ShapeDecoration
(
child:
Material
(
color:
Theme
.
of
(
context
).
colorScheme
.
onInverseSurface
,
shape:
const
OvalBorder
(),
// color: Theme.of(context).colorScheme.onSurface,
color:
Theme
.
of
(
context
).
colorScheme
.
surfaceContainerHighest
,
// borderRadius: BorderRadius.circular(100),
),
child:
FittedBox
(
fit:
BoxFit
.
contain
,
child:
Text
(
"
${match?[1]}
"
,
// style: (style ?? const TextStyle()).copyWith(),
textDirection:
textDirection
,
child:
FittedBox
(
fit:
BoxFit
.
scaleDown
,
child:
Text
(
"
${match?[1]}
"
,
// style: (style ?? const TextStyle()).copyWith(),
textDirection:
textDirection
,
),
),
),
),
...
...
Please
register
or
login
to post a comment