File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ Released packages:
274274
275275---
276276
277- fix(plugin-basic-ui): add `maxWidth` option in <Modal /> [`eb4578f`](https://github.com/daangn/stackflow/commit/eb4578f)
277+ fix(plugin-basic-ui): add `maxWidth` option in ` <Modal />` [`eb4578f`](https://github.com/daangn/stackflow/commit/eb4578f)
278278
279279Released packages:
280280- 📦 [@stackflow/
[email protected] ](https://npmjs.com/package/@stackflow/plugin-basic-ui/v/1.10.1)
Original file line number Diff line number Diff line change @@ -267,6 +267,18 @@ async function organizeChangelogEntries(
267267 return entries ;
268268}
269269
270+ /**
271+ * JSX처럼 보이는 텍스트를 백틱 코드로 감싸서 MDX 파싱 오류 방지
272+ * 예: <Modal /> → `<Modal />`
273+ */
274+ function escapeJsxLikeTags ( text : string ) : string {
275+ // 이미 백틱으로 감싸진 경우는 제외하고, <ComponentName /> 또는 <ComponentName> 패턴을 찾아서 변환
276+ return text . replace (
277+ / (?< ! ` ) ( < [ A - Z ] [ a - z A - Z ] * (?: \s + [ ^ > ] * ) ? \s * \/ ? > ) (? ! ` ) / g,
278+ "`$1`" ,
279+ ) ;
280+ }
281+
270282/**
271283 * changelog 마크다운 생성 (frontmatter 없이 컨텐츠만)
272284 */
@@ -310,7 +322,7 @@ function generateChangelogMarkdown(
310322 changesetContent += `\n${ restLines . join ( "\n" ) } ` ;
311323 }
312324
313- markdown += `${ changesetContent } \n` ;
325+ markdown += `${ escapeJsxLikeTags ( changesetContent ) } \n` ;
314326
315327 // "영향받는 패키지"를 bullet point로 추가
316328 if ( changeset . packages . length > 0 ) {
You can’t perform that action at this time.
0 commit comments