fix(project): retain monthly plan text styles

This commit is contained in:
2026-10-04 13:30:36 +09:00
parent ed7da57066
commit 86622cc4dd
7 changed files with 50 additions and 10 deletions
+3 -2
View File
@@ -3092,11 +3092,12 @@ def _month_plan(st: Any, year: int, month: int) -> list[dict[str, Any]] | None:
if not row.get("label_cont"):
label = row.get("label") or ""
cell = next((c for c in row["layout"] if c["kind"] == "month" and c["m"] <= month <= c["m"] + c["span"] - 1), None)
text = store.goal_text_plain(row["cells"].get(cell["m"], "") if cell else "").strip()
body = row["cells"].get(cell["m"], "") if cell else ""
text = store.goal_text_plain(body).strip()
if not text:
continue
rng = f"{cell['m']}~{cell['m'] + cell['span'] - 1}월" if cell["span"] > 1 else ""
items.append({"label": label, "text": text, "range": rng})
items.append({"label": label, "text": text, "text_html": store.goal_text_html(body, include_size=False), "range": rng})
if items:
out.append({"name": area["name"], "color": area["color"], "lines": items}) # 키 lines — 템플릿의 a.items 는 dict.items 메서드
return out