Skip to content

Commit dc4e5d6

Browse files
committed
fix: update escapeCell function to handle backslashes correctly
- Modified the escapeCell function to escape backslashes in addition to pipes and newlines, ensuring proper formatting in markdown output.
1 parent 5c28a15 commit dc4e5d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/app/_llms/rules/markdown-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @description `|` 기호를 `\|`로 변환합니다.
33
*/
44
export function escapeCell(s: string): string {
5-
return s.replace(/\|/g, "\\|").replace(/\n/g, " ");
5+
return s.replace(/\\/g, "\\\\").replace(/\|/g, "\\|").replace(/\n/g, " ");
66
}
77

88
/**

0 commit comments

Comments
 (0)