fix: export parseInlineElements and types from markdown.ts

This commit is contained in:
shokollm
2026-04-10 13:17:07 +00:00
parent 7795753aaa
commit 39b2b558a5

View File

@@ -3,13 +3,13 @@
* Supports: bold, italic, code blocks, inline code, links, lists, tables, headings, line breaks
*/
interface InlineSegment {
export interface InlineSegment {
type: 'text' | 'bold' | 'italic' | 'code' | 'link';
content: string;
href?: string;
}
interface ParsedSegment {
export interface ParsedSegment {
type: 'text' | 'bold' | 'italic' | 'code' | 'codeBlock' | 'link' | 'list' | 'table' | 'lineBreak' | 'heading';
content: string;
items?: string[];
@@ -106,7 +106,7 @@ function parseTableRow(row: string): InlineSegment[][] {
.map(cell => parseInlineElements(cell));
}
function parseInlineElements(text: string): InlineSegment[] {
export function parseInlineElements(text: string): InlineSegment[] {
const segments: InlineSegment[] = [];
const inlineRegex = /(\*\*[^*]+\*\*|\*[^*]+\*|`[^`]+`|\[.*?\]\(.*?\))/g;