Number diff lines, render task lists, and add word navigation

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
Muhammad Zakir Ramadhan
2026-09-05 17:31:00 +07:00
co-authored by Sisyphus
parent 940a1e7401
commit 3ef2d8a75a
6 changed files with 203 additions and 22 deletions
+18
View File
@@ -20,6 +20,24 @@ test('markdown renders headings, bullets, and code distinctly', () => {
app.unmount();
});
test('a task list renders as checkboxes, not as literal brackets', () => {
// Models write progress as markdown task lists. Rendering "- [x] done" literally
// turns a status report into markup noise.
const app = render(<Markdown text={'- [x] first\n- [ ] second'} />);
const frame = app.lastFrame() ?? '';
expect(frame).toContain('[x] first');
expect(frame).toContain('[ ] second');
app.unmount();
});
test('an ordered list keeps its numbers rather than becoming dashes', () => {
const app = render(<Markdown text={'1. first step\n2. second step'} />);
const frame = app.lastFrame() ?? '';
expect(frame).toContain('1. first step');
expect(frame).toContain('2. second step');
app.unmount();
});
test('markdown strips the markup characters from the rendered output', () => {
const app = render(<Markdown text={'Use **bold** and `code` here.'} />);
const frame = app.lastFrame() ?? '';