diff --git a/src/features/tech-log/presentation/shared/public-render/inline-renderer.tsx b/src/features/tech-log/presentation/shared/public-render/inline-renderer.tsx
index d6e8fd1..5216346 100644
--- a/src/features/tech-log/presentation/shared/public-render/inline-renderer.tsx
+++ b/src/features/tech-log/presentation/shared/public-render/inline-renderer.tsx
@@ -33,6 +33,15 @@ function renderText(text: string, key: number) {
);
}
+/**
+ * 작성자가 직접 쓴 평문. 요약·문제·결론·환경처럼 Markdown 을 거치지 않고 그대로 그려지는 칸들이
+ * 여기 온다 — 그 칸들은 텍스트 노드에 줄바꿈이 그대로 들어가고, HTML 이 그것을 공백으로 접어
+ * 작성자가 나눠 쓴 줄이 이어져 보였다. 본문(Markdown)만 고쳤을 때 이 칸들이 남아 있던 이유다.
+ */
+export function PlainText({ text }: { text: string }) {
+ return renderText(text, 0);
+}
+
function renderInline(inline: Inline, key: number) {
switch (inline.type) {
case "TEXT":
diff --git a/src/features/tech-log/presentation/shared/public-render/public-record-renderer.tsx b/src/features/tech-log/presentation/shared/public-render/public-record-renderer.tsx
index 8d5d3e6..ab68645 100644
--- a/src/features/tech-log/presentation/shared/public-render/public-record-renderer.tsx
+++ b/src/features/tech-log/presentation/shared/public-render/public-record-renderer.tsx
@@ -2,6 +2,7 @@ import { Link } from "react-router-dom";
import type { components } from "../../../contracts/studio/generated.ts";
import { inlinePlainText } from "../../../domain/content-format/inline-plain-text.ts";
+import { PlainText } from "./inline-renderer.tsx";
import type {
ResolveEvidenceAsset,
ResolvePublishedLabel,
@@ -92,7 +93,7 @@ function ModelDocumentHeader({
) : null}
{model.title}
-
{model.summary}
+
유형
@@ -149,21 +150,21 @@ function GenericCase({
문제
-
{model.problem}
+
결론
-
{model.conclusion}
+
검증 환경
-
{model.environment}
+
검증 데이터
-
{model.reproduction}
+
@@ -213,27 +214,27 @@ function FetchJoinCase({
{model.title}
-
{model.summary}
+
문제
-
{model.problem}
+
결론
-
{model.conclusion}
+
검증 환경
-
{model.environment}
+
데이터셋
-
{model.reproduction.replace(/^Dataset:\s*/, "")}
+
기록
@@ -287,7 +288,7 @@ function ReferenceDocument({
Purpose
이 기준을 쓰는 이유
-
{model.purpose}
+
@@ -434,7 +435,7 @@ function QuestionDocument({
>
Next
다음 검증
-
{model.nextValidation}
+
@@ -476,11 +477,11 @@ function ProjectDecisionDocument({
{model.title}
-
{model.statement}
+
판단 이유
-
{model.rationale}
+
영향
diff --git a/tests/component/inline-line-breaks.test.tsx b/tests/component/inline-line-breaks.test.tsx
index c7e2797..7dc635a 100644
--- a/tests/component/inline-line-breaks.test.tsx
+++ b/tests/component/inline-line-breaks.test.tsx
@@ -3,7 +3,10 @@
import { render } from "@testing-library/react";
import { describe, expect, it } from "vitest";
-import { InlineRenderer } from "../../src/features/tech-log/presentation/shared/public-render/inline-renderer.tsx";
+import {
+ InlineRenderer,
+ PlainText,
+} from "../../src/features/tech-log/presentation/shared/public-render/inline-renderer.tsx";
/**
* 작성자가 엔터로 나눠 쓴 글이 한 줄로 이어져 보였다. Markdown 이 한 번의 줄바꿈을 문단 내 공백으로
@@ -34,3 +37,19 @@ describe("문단 안의 줄바꿈", () => {
expect(container.querySelectorAll("br")).toHaveLength(2);
});
});
+
+/**
+ * 요약·문제·결론·환경은 Markdown 을 거치지 않고 그대로 그려진다. 본문만 고쳤을 때 이 칸들이
+ * 여전히 이어져 보인 이유이고, 작성자가 "아직 안 고쳐졌다" 고 본 것도 이쪽이다.
+ */
+describe("Markdown 을 거치지 않는 평문 칸", () => {
+ it("작성자가 나눠 쓴 줄을 지킨다", () => {
+ const { container } = render();
+ expect(container.querySelectorAll("br")).toHaveLength(1);
+ });
+
+ it("한 줄이면 를 넣지 않는다", () => {
+ const { container } = render();
+ expect(container.querySelectorAll("br")).toHaveLength(0);
+ });
+});