Skip to content
This repository was archived by the owner on Mar 18, 2026. It is now read-only.

Commit df8de63

Browse files
authored
Merge pull request #281 from X2bee/main
feat: Normalize non-standard pipe characters in MessageRenderer and p…
2 parents fc4a24e + 47db442 commit df8de63

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/app/_common/components/chatParser/ChatParser.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ export const MessageRenderer: React.FC<MessageRendererProps> = ({
9191
return null;
9292
}
9393

94+
// 비표준 파이프 문자를 표준 Markdown 파이프로 정규화
95+
processedContent = normalizeTableSeparators(processedContent);
96+
9497
if (isUserMessage) {
9598
return (
9699
<div className={`${styles.markdownContent} ${className}`}>
@@ -142,13 +145,12 @@ export const MessageRenderer: React.FC<MessageRendererProps> = ({
142145
* 컨텐츠를 React 엘리먼트로 파싱
143146
*/
144147
const parseContentToReactElements = (content: string, onViewSource?: (sourceInfo: SourceInfo) => void, onHeightChange?: () => void, mode?: "existing" | "new-workflow" | "new-default" | "deploy" | "embed"): React.ReactNode[] => {
145-
// 이 시점에서 content는 이미 MessageRenderer에서 문자열로 변환되었음
148+
// 이 시점에서 content는 이미 MessageRenderer에서 문자열로 변환되고 정규화되었음
146149
if (!content) {
147150
return [];
148151
}
149152

150-
// 비표준 파이프 문자를 먼저 정규화
151-
let processed = normalizeTableSeparators(content);
153+
let processed = content;
152154

153155
// 스트림 모드 감지를 위한 헬퍼 함수
154156
const detectStreaming = (text: string, textStartIndex: number, totalLength: number): boolean => {

0 commit comments

Comments
 (0)