diff --git a/M01_MasterData/M01_MasterData_Store_Make.py b/M01_MasterData/M01_MasterData_Store_Make.py index 029ce0d35..13762011a 100644 --- a/M01_MasterData/M01_MasterData_Store_Make.py +++ b/M01_MasterData/M01_MasterData_Store_Make.py @@ -104,7 +104,16 @@ def sections(book: str, division: str = "", chapter: str = "", q: str = "", limi # ── 로직 원문(출처 글 → 품셈 본문 절) ────────────────────────────────── -_NUMBER = re.compile(r"(?~`])") # 마크다운 이스케이프 `\.` `\-` … +_COMMENT = re.compile(r"") # 글 안 주석(글자층 표시) — 글자만 남김 +_CIRCLED = "①②③④⑤⑥⑦⑧⑨⑩⑪⑫⑬⑭⑮⑯⑰⑱⑲⑳" + + +def _plain(text: str) -> str: + """원문 md 기호 벗김 — 주석 · 이스케이프 · 인용 머리 `> `.""" + text = _ESCAPE.sub(r"\1", _COMMENT.sub("", text)).strip() + return text[1:].strip() if text.startswith(">") else text def _blocks(lines: list[str]) -> list[dict]: @@ -117,10 +126,15 @@ def _blocks(lines: list[str]) -> list[dict]: if not text or text.startswith("