fix(app): prevent inline code from obscuring text

Explicit inline-code line height creates oversized painted backgrounds when mixed markdown wraps on native. Let native font metrics determine the span height so adjacent lines remain visible.
This commit is contained in:
Mohamed Boudra
2026-08-09 11:33:58 +02:00
parent c77a6761af
commit 6ae6231d1f
2 changed files with 2 additions and 3 deletions
@@ -77,8 +77,8 @@ describe("createMarkdownStyles", () => {
expect(styles.code_inline).toMatchObject({
fontFamily: darkTheme.fontFamily.mono,
fontSize: darkTheme.fontSize.code,
lineHeight: Math.round(darkTheme.fontSize.code * 1.45),
});
expect(styles.code_inline).not.toHaveProperty("lineHeight");
expect(styles.code_block).toMatchObject({
fontFamily: darkTheme.fontFamily.mono,
fontSize: darkTheme.fontSize.code,
@@ -90,7 +90,7 @@ describe("createMarkdownStyles", () => {
expect(compactStyles.code_inline).toMatchObject({
fontFamily: darkTheme.fontFamily.mono,
fontSize: darkTheme.fontSize.code,
lineHeight: Math.round(darkTheme.fontSize.code * 1.45),
});
expect(compactStyles.code_inline).not.toHaveProperty("lineHeight");
});
});
@@ -172,7 +172,6 @@ export function createMarkdownStyles(theme: Theme) {
borderWidth: 0,
fontFamily: theme.fontFamily.mono,
fontSize: theme.fontSize.code,
lineHeight: Math.round(theme.fontSize.code * 1.45),
},
code_block: {