Skip to content

Commit 3196263

Browse files
committed
content [nfc]: Reassert normal font weight for plain code-block text
I *think* it's not possible for a code block to appear in a bold context. In particular I haven't found a way to put one inside a spoiler header. Anyway, just in case it does end up being possible somehow, might as well clobber the bold with normal weight, to make sure the code block's bold spans remain distinct from non-bold spans. It's convenient (and cheap) to do that here in the CodeBlockTextStyles constructor.
1 parent 4cac4de commit 3196263

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/widgets/code_block.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ class CodeBlockTextStyles {
1515
plain: kMonospaceTextStyle
1616
.merge(const TextStyle(
1717
fontSize: 0.825 * kBaseFontSize,
18-
height: 1.4)),
18+
height: 1.4))
19+
.merge(weightVariableTextStyle(context)),
1920

2021
// .hll { background-color: hsl(60deg 100% 90%); }
2122
hll: TextStyle(backgroundColor: const HSLColor.fromAHSL(1, 60, 1, 0.90).toColor()),

0 commit comments

Comments
 (0)