chore: follow up Simplify codeblock code

This commit is contained in:
Christian Kußowski 2025-11-19 10:37:42 +01:00
parent c3ec0491d1
commit 5262395340
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652

View file

@ -369,28 +369,20 @@ class HtmlMessage extends StatelessWidget {
side: const BorderSide(color: hightlightTextColor),
borderRadius: BorderRadius.circular(4),
),
child: isInline
? Padding(
padding: const EdgeInsets.symmetric(horizontal: 4.0),
child: Text.rich(
TextSpan(
children: [_renderCodeBlockNode(element)],
),
selectionColor: hightlightTextColor.withAlpha(128),
),
)
: Padding(
padding: const EdgeInsets.symmetric(
child: Padding(
padding: isInline
? const EdgeInsets.symmetric(horizontal: 4.0)
: const EdgeInsets.symmetric(
horizontal: 8.0,
vertical: 4.0,
),
child: Text.rich(
TextSpan(
children: [_renderCodeBlockNode(element)],
),
selectionColor: hightlightTextColor.withAlpha(212),
),
),
child: Text.rich(
TextSpan(
children: [_renderCodeBlockNode(element)],
),
selectionColor: hightlightTextColor.withAlpha(128),
),
),
),
);
case 'img':