Skip to content

Commit 444a32f

Browse files
base katex overline, underline implementation
1 parent c6d8b3b commit 444a32f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/widgets/katex.dart

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,12 @@ class KatexWidget extends StatelessWidget {
4242
Widget build(BuildContext context) {
4343
Widget widget = _KatexNodeList(nodes: nodes);
4444

45-
return IntrinsicWidth(
46-
child: Directionality(
45+
return Directionality(
4746
textDirection: TextDirection.ltr,
4847
child: DefaultTextStyle(
4948
style: mkBaseKatexTextStyle(textStyle).copyWith(
5049
color: ContentTheme.of(context).textStylePlainParagraph.color),
51-
child: widget)));
50+
child: widget));
5251
}
5352
}
5453

@@ -246,11 +245,11 @@ class _KatexVlist extends StatelessWidget {
246245
Widget build(BuildContext context) {
247246
final em = DefaultTextStyle.of(context).style.fontSize!;
248247

249-
return IntrinsicWidth(child: Stack(children: List.unmodifiable(node.rows.map((row) {
248+
return Stack(children: List.unmodifiable(node.rows.map((row) {
250249
return Transform.translate(
251250
offset: Offset(0, row.verticalOffsetEm * em),
252251
child: _KatexSpan(row.node));
253-
}))));
252+
})));
254253
}
255254
}
256255

0 commit comments

Comments
 (0)