Skip to content

armgit / Orkas

Public Imported from GitHub
0

Orkas is an open-source (MIT), local-first AI team for your desktop: a Commander turns your goal into to-dos and coordinates 16 built-in specialist agents plus Claude Code, Codex, OpenCode, OpenClaw and Hermes, with projects, scheduled automations and connectors. Free app for macOS & Windows; built-in models or your own keys.

876 B
Raw Blame
import { describe, expect, it } from 'vitest';

// eslint-disable-next-line @typescript-eslint/no-var-requires
const { renderMarkdown } = require('../../src/renderer/modules/utils.js') as {
  renderMarkdown: (md: string) => string;
};

describe('markdown ordered-list numbering', () => {
  it('restarts a new list when the source restarts at 1 after a paragraph', () => {
    const html = renderMarkdown(`前置建议:

1. 先扫描
2. 再确认
3. 最后处理

建议的根治顺序:

1. 先做诊断
2. 再做改造
3. 最后回填`);

    expect(html.match(/<ol(?:\s[^>]*)?>/g)).toEqual(['<ol>', '<ol>']);
    expect(html).not.toContain('<ol start="4">');
  });

  it('honors an explicit non-one start on a new list', () => {
    const html = renderMarkdown(`前置说明。

4. 从第四项继续
5. 完成`);

    expect(html).toContain('<ol start="4">');
  });
});