fix(M01): 목록 검색이 양쪽 띄어쓰기를 떼고 맞댐 — 골 함 석 ↔ 함석 (PLAN 8-5)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JgUhN55Z3BCYhUJTjwTNfj
This commit is contained in:
@@ -88,10 +88,8 @@ def chapter_of(file: str, data: dict | None = None) -> str:
|
||||
|
||||
|
||||
def _hit(row: dict, q: str) -> bool:
|
||||
q = q.lower()
|
||||
return not q or any(
|
||||
q in str(row.get(k, "")).lower() for k in ("키", "원문번호", "이름", "옛이름")
|
||||
)
|
||||
q = _squash(q) # 띄어쓰기 무시 — 「골 함 석」 ↔ 「함석」
|
||||
return not q or any(q in _squash(row.get(k, "")) for k in ("키", "원문번호", "이름", "옛이름"))
|
||||
|
||||
|
||||
def _book(data: dict) -> str | None:
|
||||
|
||||
Reference in New Issue
Block a user