Merge remote-tracking branches 'origin/main_laptop_1' and 'origin/sub_laptop_5' into sub_laptop_2

This commit is contained in:
2026-09-28 13:29:02 +09:00
3 changed files with 1426 additions and 4 deletions
+5 -1
View File
@@ -185,7 +185,11 @@ function renderNumericSection(toks: Tok[], magnitude: Frac): string {
const rawFracStr = fracDigitToks.length > 0 ? allDigits.slice(-fracDigitToks.length) : "";
let intStr = rawIntStr;
if (intDigitToks.length > intStr.length) {
// 정수부가 온통 `?`(회계 형식 0 구역의 `"-"??` 자리맞춤 버릇)뿐이고 값이 정말 0 이면
// 자리마다 빈칸(엑셀은 `?` 를 「있으면 숫자 · 없으면 빈칸」으로 봄 — `0` 처럼 0 을 안 채움).
if (intDigitToks.length > 0 && rawIntStr === "0" && intDigitToks.every((t) => t.ch === "?")) {
intStr = " ".repeat(intDigitToks.length);
} else if (intDigitToks.length > intStr.length) {
const need = intDigitToks.length - intStr.length;
let pad = "";
for (let i = 0; i < need; i++) pad += intDigitToks[i].ch === "0" ? "0" : "";
File diff suppressed because it is too large Load Diff
@@ -441,6 +441,16 @@ ok(
fmt(frac(2n), '_-[$€-2]* #,##0.00_-;-[$€-2]* #,##0.00_-;_-[$€-2]* "-"??_-') === " €2.00 ",
fmt(frac(2n), '_-[$€-2]* #,##0.00_-;-[$€-2]* #,##0.00_-;_-[$€-2]* "-"??_-'),
);
ok(
"회계형 0 구역 '-'?? 는 자리만(0 안 보임)",
fmt(frac(0n), '_-[$-412]* #,##0.00_-;-[$-412]* #,##0.00_-;_-[$-412]* "-"??_-') === " - ",
JSON.stringify(fmt(frac(0n), '_-[$-412]* #,##0.00_-;-[$-412]* #,##0.00_-;_-[$-412]* "-"??_-')),
);
ok(
"통화 로캘 태그만([$-412] · 기호 없음)은 통화 기호를 안 보임",
!fmt(frac(2n), "[$-412]#,##0.00").includes("₩") && fmt(frac(2n), "[$-412]#,##0.00") === "2.00",
fmt(frac(2n), "[$-412]#,##0.00"),
);
ok("따옴표 접두·접미", fmt(frac(800n), '"φ"###') === "φ800", fmt(frac(800n), '"φ"###'));
ok(
"음수 회계형",