fix(833-1): 원문 패널 표 깨짐 — 표 맨 아래 비고 · [주] · ※ 서술 줄을 표 밖 글로 · 서술 칸 줄바꿈

- 새 순수 계산 logic/M01_MasterData_logic_source_notes.ts (서술 줄 가르기 · 줄바꿈 칸 판정) · 원문 글 · 차례 그대로
- 원문 표 2,573 · 폭 420 기준 서술 줄 때문에 넘친 표 138 → 0 · 넘침 1,228 → 1,020
- 시험 test_833_1_source_notes (보기 + 전수 글 보존)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 10:06:06 +09:00
co-authored by Claude Sonnet 5.5
parent 2a38ad51b2
commit 5e6037270e
4 changed files with 184 additions and 4 deletions
@@ -8,6 +8,7 @@
import { currentLanguageIndex } from "@ui/ui_template_locale";
import { el } from "@ui/ui_template_elements";
import { API_BASE_URL } from "@config/config_frontend";
import { splitTableNotes, wrapCell } from "./logic/M01_MasterData_logic_source_notes";
import "./M01_MasterData_UI_LogicLab_Side.css";
const TEXT = {
@@ -48,22 +49,45 @@ function blockNode(b: Block): HTMLElement {
}
function rawNode(b: Block): HTMLElement {
if (b.table)
return el("div", {
if (b.table) {
// 표 맨 아래 비고 · [주] · ※ 줄 = 표 밖 글로(833-1) — 긴 글이 열 폭을 밀지 않게
const { rows, notes } = splitTableNotes(b.table);
const grid = el("div", {
className: "m01-logic__scroll",
children: [
el("table", {
className: "ui-table ui-table--data m01-logic__grid m01lab-src__table",
children: [
el("tbody", {
children: b.table.map((r) =>
el("tr", { children: r.map((c) => el("td", { text: c })) }),
children: rows.map((r) =>
el("tr", {
children: r.map((c) =>
el("td", {
text: c,
className: wrapCell(c, r.length) ? "m01lab-src__wrapcell" : "",
}),
),
}),
),
}),
],
}),
],
});
if (!notes.length) return grid;
return el("div", {
className: "m01lab-src__tblwrap",
children: [
grid,
...notes.map((n) =>
el("p", {
className: "m01lab-src__p m01lab-src__tnote",
children: [...(n.label ? [el("strong", { text: n.label }), " "] : []), n.text],
}),
),
],
});
}
if (b.h) return el("h4", { className: "m01lab-src__head", text: b.text ?? "" });
return el("p", { className: "m01lab-src__p", text: b.p ?? "" });
}