build method
Implementation
@override
Widget build(
BuildContext context,
String text,
final GptMarkdownConfig config,
) {
String codes = this.exp.firstMatch(text)?[2] ?? "";
String name = this.exp.firstMatch(text)?[1] ?? "";
codes = codes.replaceAll(r"```", "").trim();
bool closed = text.endsWith("```");
return config.codeBuilder?.call(context, name, codes, closed) ??
CodeField(name: name, codes: codes);
}