From 44cc3b355d108a42c9919310f1b74f56e79fa0bc Mon Sep 17 00:00:00 2001 From: hysong4u Date: Tue, 3 Dec 2024 14:18:51 +0900 Subject: [PATCH] =?UTF-8?q?#18=20[fix]=20content=20format=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/domain/template/service/TemplateService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/autorepo/server/domain/template/service/TemplateService.java b/src/main/java/org/autorepo/server/domain/template/service/TemplateService.java index 7de363c..8d759b3 100644 --- a/src/main/java/org/autorepo/server/domain/template/service/TemplateService.java +++ b/src/main/java/org/autorepo/server/domain/template/service/TemplateService.java @@ -49,9 +49,10 @@ public void uploadTemplate(UploadTemplateRequestDto uploadTemplateRequestDto, Lo // PR/ISSUE 템플릿 구분 boolean isPR = uploadTemplateRequestDto.type() == TemplateType.PR; String metaContent = "---\nname: Issue template\nabout: Issue template\ntitle: ''\nlabels: ''\nassignees: ''\n---"; - String formattedContent = uploadTemplateRequestDto.content().replace("\n", "
"); - System.out.println("formattedContent = " + formattedContent); + String formattedContent = uploadTemplateRequestDto.content() + .replace("\\n", " \n"); // 두 개의 공백 + \n으로 변환 String content = isPR ? formattedContent : metaContent + "\n" + formattedContent; + System.out.println("formattedContent = " + formattedContent); String path = isPR ? ".github/pull_request_template.md" : ".github/ISSUE_TEMPLATE/issue_template.md"; HttpHeaders headers = new HttpHeaders();