span method
Implementation
@override
InlineSpan span(
BuildContext context,
String text,
final GptMarkdownConfig config,
) {
var match = exp.firstMatch(text.trim());
var conf = config.copyWith(
style: config.style?.copyWith(
fontWeight: FontWeight.bold,
background: Paint()
..color = Theme.of(context).colorScheme.onInverseSurface
..strokeCap = StrokeCap.round
..strokeJoin = StrokeJoin.round,
) ??
TextStyle(
fontWeight: FontWeight.bold,
background: Paint()
..color = Theme.of(context).colorScheme.surfaceContainerHighest
..strokeCap = StrokeCap.round
..strokeJoin = StrokeJoin.round,
),
);
return TextSpan(
text: match?[1],
style: conf.style,
);
}