feat(markdown): add horizontal scroll for long math expressions

This commit is contained in:
cogwheel0
2025-12-07 15:05:28 +05:30
parent dd5098d1f8
commit fe0701b7b3

View File

@@ -776,9 +776,13 @@ class _LatexBuilder extends MarkdownElementBuilder {
return mathWidget; return mathWidget;
} }
// Wrap block math in horizontal scroll for long expressions
return Padding( return Padding(
padding: const EdgeInsets.symmetric(vertical: Spacing.xs), padding: const EdgeInsets.symmetric(vertical: Spacing.xs),
child: Center(child: mathWidget), child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: mathWidget,
),
); );
} }
} }