From 39b2b558a5837e3aea77acbf6b5fb90d466767b2 Mon Sep 17 00:00:00 2001 From: shokollm <270575765+shokollm@users.noreply.github.com> Date: Fri, 10 Apr 2026 13:17:07 +0000 Subject: [PATCH] fix: export parseInlineElements and types from markdown.ts --- src/frontend/src/lib/utils/markdown.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frontend/src/lib/utils/markdown.ts b/src/frontend/src/lib/utils/markdown.ts index 783bdee..a613531 100644 --- a/src/frontend/src/lib/utils/markdown.ts +++ b/src/frontend/src/lib/utils/markdown.ts @@ -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;