The HTML and Markdown choice drops the Markdown source view (#285)

Rendered Markdown is the one wanted beside the publisher's HTML. A browser
that had chosen the source view shows the HTML.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-18 18:45:18 +00:00
parent d5ffe5d042
commit b4c0048f68
4 changed files with 6 additions and 9 deletions

View File

@@ -537,10 +537,9 @@ test('an item sent as HTML and Markdown switches between them', async ({ page })
await expect(page.locator('#detail .dbody b')).toHaveText('HTML');
await view.selectOption('markdown');
await expect(page.locator('#detail .dbody strong')).toHaveText('Markdown');
await view.selectOption('source');
await expect(page.locator('#detail .dbody pre.mdsrc')).toHaveText('The **Markdown** copy.');
await expect(view.locator('option')).toHaveText(['HTML', 'Markdown']);
// Kept for the next item; set back so nothing after this sees it.
expect(await page.evaluate(() => localStorage.getItem('ipx.textview'))).toBe('source');
expect(await page.evaluate(() => localStorage.getItem('ipx.textview'))).toBe('markdown');
await view.selectOption('html');
// An item with no Markdown has no choice to make.