import test from 'node:test';
import assert from 'node:assert/strict';
import { contentHasMath, ensureMathRenderer, renderInlineMarkdown } from './renderMarkdown';
import { sanitizeMermaidCode } from '../components/doc/blocks/MermaidBlockView';
test('renderInlineMarkdown: renders bold, italic, strikethrough', () => {
const input = '**粗体指标** *斜体说明* ~~废弃版本~~';
const html = renderInlineMarkdown(input);
assert.ok(html.includes('粗体指标'));
assert.ok(html.includes('斜体说明'));
assert.ok(html.includes('废弃版本'));
});
test('renderInlineMarkdown: escapes raw HTML tags to prevent XSS', () => {
const scriptHtml = renderInlineMarkdown('');
assert.ok(!scriptHtml.includes('');
assert.ok(!forged.includes('