@@ -6,7 +6,6 @@ import 'package:flutter/rendering.dart';
66
77import '../model/content.dart' ;
88import '../model/katex.dart' ;
9- import 'content.dart' ;
109
1110/// Creates a base text style for rendering KaTeX content.
1211///
@@ -16,17 +15,14 @@ import 'content.dart';
1615/// https://github.com/KaTeX/KaTeX/blob/613c3da8/src/styles/katex.scss#L13-L15
1716///
1817/// Requires the [ambientStyle.fontSize] to be non-null.
19- TextStyle mkBaseKatexTextStyle (TextStyle ambientStyle, Color baseColor ) {
18+ TextStyle mkBaseKatexTextStyle (TextStyle ambientStyle) {
2019 return ambientStyle.copyWith (
2120 ////// Overrides of our own styles:
2221
2322 // Bold formatting is removed below by setting FontWeight.normal…
2423 // Just for completeness, remove "wght", but it wouldn't do anything anyway
2524 // since KaTeX_Main is not a variable-weight font.
2625 fontVariations: [],
27- // Remove link color, but
28- // TODO(#1823) do we want to do that? Web doesn't.
29- color: baseColor,
3026 // Italic is removed below.
3127
3228 // Strikethrough is removed below, which affects formatting of rendered
@@ -68,8 +64,7 @@ class KatexWidget extends StatelessWidget {
6864 return Directionality (
6965 textDirection: TextDirection .ltr,
7066 child: DefaultTextStyle (
71- style: mkBaseKatexTextStyle (ambientTextStyle,
72- ContentTheme .of (context).textStylePlainParagraph.color! ),
67+ style: mkBaseKatexTextStyle (ambientTextStyle),
7368 child: widget));
7469 }
7570}
0 commit comments