refactor: refactor settings to a nested structure (#7244)

This commit is contained in:
Gal Zahavi
2025-08-27 18:39:45 -07:00
committed by GitHub
parent b8a7bfd136
commit f22263c9e8
41 changed files with 2852 additions and 1424 deletions

View File

@@ -134,7 +134,7 @@ export function colorizeCode(
): React.ReactNode {
const codeToHighlight = code.replace(/\n$/, '');
const activeTheme = theme || themeManager.getActiveTheme();
const showLineNumbers = settings?.merged.showLineNumbers ?? true;
const showLineNumbers = settings?.merged.ui?.showLineNumbers ?? true;
try {
// Render the HAST tree using the adapted theme

View File

@@ -25,6 +25,7 @@ describe('<MarkdownDisplay />', () => {
{ path: '', settings: {} },
[],
true,
new Set(),
);
beforeEach(() => {
@@ -224,10 +225,11 @@ Another paragraph.
const settings = new LoadedSettings(
{ path: '', settings: {} },
{ path: '', settings: {} },
{ path: '', settings: { showLineNumbers: false } },
{ path: '', settings: { ui: { showLineNumbers: false } } },
{ path: '', settings: {} },
[],
true,
new Set(),
);
const { lastFrame } = render(