Commit Graph
4 Commits
Author SHA1 Message Date
DongHyeonkaandClaude Opus 5 9b7ad82fe3 fix: 산문 칸의 문단과 인라인 코드를 읽어서 그린다
Case 만 블록 파서를 타고 나머지 유형은 문자열을 그대로 내보내고 있었다.
그래서 두 가지가 깨졌다.

작성자가 백틱으로 적은 식별자가 백틱째 화면에 나왔다. 어떤 Reference 는
한 문서에 백틱이 32개였고, 그 원문이 홈 카드·탐색 카드·검색 결과까지
그대로 퍼졌다. 판단 기준은 `<p>{rule.body}</p>` 로, 적용할 때·예외·예시는
`<li>{item.text}</li>` 로 아무것도 거치지 않고 나가고 있었다.

빈 줄로 나눈 문단이 문단으로 보이지 않았다. 어제 넣은 PlainText 는 모든
줄바꿈을 <br> 로 만들었기 때문에 빈 줄도 <br><br> 로 나갔고, 문단 사이
여백이 없었다. Reference 7개 전부에 빈 줄이 9~16개 있다.

ProseText 로 바꾼다 — 빈 줄은 문단을 가르고, 문단 안 줄바꿈은 그 자리에
지키고, 백틱은 코드로 읽는다. 백틱 수가 홀수면 원문을 그대로 둔다:
작성자가 백틱 자체를 쓴 것일 수 있고, 반쯤 해석해 한쪽만 코드로 만드는
쪽이 더 나쁘다.

블록 파서(parseCaseContent)를 쓰지 않는 이유는 그쪽이 Case 전용 문법과
도식 참조까지 물고 있어 이 칸들에 없는 해석기를 끌고 오기 때문이다.

머리말 가드는 <br> 개수로 재고 있었다. 이제 기준이 문단이므로 문단 수와
문단 안 줄바꿈을 함께 확인하도록 고친다 — 가드가 낡은 것이지 화면이
틀린 것이 아니다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011nAjrqNHGPNngN4aUbcyvJ
2026-08-31 08:06:03 +09:00
DongHyeonkaandClaude Opus 5 4e486aac59 fix: 요약을 2000자까지 쓰고, 목록과 머리말이 그 길이를 견디게 한다
600 은 「아래 저장 경로가 이미 600 이니 거기 맞추자」는 판단이었지 실제로
쓰는 글의 길이를 본 것이 아니었다. 요약은 여러 문단이다.

길어진 요약이 드러낸 두 가지를 함께 고친다.

목록: 최근 기록·탐색·검색·홈 초점은 요약을 통째로 그렸다. 2000자면 한
항목이 화면을 덮어 목록이 목록이 아니게 된다. 세 줄에서 자른다 — 전문은
문서를 열면 나온다.

머리말: `public-document-header` 만 `PlainText` 를 거치지 않고 요약을
그대로 넣고 있었다. 작성자가 나눈 문단이 전부 한 덩어리로 이어졌다.
판단 결정 요약에서 고쳤던 것과 같은 결함이고, 이 자리를 빠뜨렸다.
되돌리면 <br> 가 3개에서 0개가 되어 가드가 깨지는 것을 확인했다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011nAjrqNHGPNngN4aUbcyvJ
2026-08-29 22:23:13 +09:00
DongHyeonka 21f8425f1e fix: keep line breaks in the fields that are not Markdown
The earlier fix covered the Markdown body and stopped there, so the preview
still ran lines together — which is exactly what it looked like from the
outside: nothing had changed.

Summary, problem, conclusion, environment and the rest are plain text. They
never pass through the Markdown parser, so their newlines sit in a text node
and HTML collapses them, and the renderer that now emits <br> for the body was
never asked about them.

They render through the same rule now. One helper, one behaviour: a line the
author broke stays broken, wherever they typed it.
2026-08-21 15:54:28 +09:00
DongHyeonka d2c289c650 fix: keep the line breaks an author typed
Text written across several lines rendered as one run-on line. Markdown reads a
single newline as a space that joins a paragraph, the parser leaves that
newline inside the text node, and HTML then collapses it — so the break the
author pressed Enter for disappeared at the last step.

This was never a preview artifact: the Studio preview and the public page go
through the same renderer, so a published record ran its lines together too.

Newlines inside a paragraph now render as <br>. Paragraphs separated by a blank
line are already two paragraphs by the time they reach here, so this only
affects the breaks an author put inside one.
2026-08-21 15:10:27 +09:00