Skip to content

Commit db39d52

Browse files
committed
优化正则表达式
1 parent c315379 commit db39d52

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/services/publish_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def update_docs():
3030
path_define.docs_dir.mkdir(parents=True, exist_ok=True)
3131

3232
for path_from in path_define.outputs_dir.iterdir():
33-
if re.match(r'info-.*px-.*\.md|preview-.*px\.png', path_from.name) is None:
33+
if re.match(r'^(info-.*px-.*\.md|preview-.*px\.png)$', path_from.name) is None:
3434
continue
3535
path_to = path_from.copy_into(path_define.docs_dir)
3636
logger.info("Copy file: '{}' -> '{}'", path_from, path_to)

0 commit comments

Comments
 (0)