Skip to content

Commit 4e79a6a

Browse files
committed
Feat: html 주석 제거 함수 추가
1 parent 5a7d798 commit 4e79a6a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

components/markdown-renderer.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,18 @@ export default function MarkdownRenderer({
100100
});
101101
};
102102

103+
// HTML 주석 제거 함수 추가
104+
const removeHtmlComments = (text: string) => {
105+
return text.replace(/<!--[\s\S]*?-->/g, '');
106+
};
107+
103108
// 처리 순서 변경: 위키링크 처리 전에 콜아웃 처리
104109
const processedContent = processUncycloLinks(content);
105110
const fullProcessedContent = processContentWithCallouts(processedContent);
111+
// HTML 주석 제거 처리 추가
112+
const withoutComments = removeHtmlComments(fullProcessedContent);
106113
// 최종 처리된 콘텐츠
107-
const finalProcessedContent = fullProcessedContent;
114+
const finalProcessedContent = withoutComments;
108115

109116
const components = {
110117
h1: ({ children }: { children?: React.ReactNode }) => (

0 commit comments

Comments
 (0)