fix: 修复多占位符识别,补充测试
This commit is contained in:
+3
-3
@@ -13,10 +13,10 @@ def parse_template(file_path: str) -> dict:
|
||||
for row in ws.iter_rows():
|
||||
for cell in row:
|
||||
if cell.value and isinstance(cell.value, str):
|
||||
m = PLACEHOLDER_RE.search(cell.value)
|
||||
if m:
|
||||
matches = PLACEHOLDER_RE.findall(cell.value)
|
||||
for name in matches:
|
||||
placeholders.append({
|
||||
"name": m.group(1),
|
||||
"name": name,
|
||||
"sheet": sheet_name,
|
||||
"cell": cell.coordinate,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user