Merge pull request #245 from cogwheel0/markdown-horizontal-scroll-math

feat(markdown): add horizontal scroll for long math expressions
This commit is contained in:
cogwheel
2025-12-07 17:35:45 +08:00
committed by GitHub

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,
),
); );
} }
} }