From 8e9578c04db62431a52ba29e7ad5f1fee3dcc427 Mon Sep 17 00:00:00 2001 From: tpoisonooo Date: Wed, 7 Sep 2022 15:59:48 +0800 Subject: [PATCH] fix(CI): update link checker (#1008) --- .github/scripts/doc_link_checker.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/scripts/doc_link_checker.py b/.github/scripts/doc_link_checker.py index 00e2fbc9bc..f9fdd4e42e 100644 --- a/.github/scripts/doc_link_checker.py +++ b/.github/scripts/doc_link_checker.py @@ -38,6 +38,15 @@ def analyze_doc(home, path): if '[' in line and ']' in line and '(' in line and ')' in line: all = pattern.findall(line) for item in all: + # skip ![]() + if item.find('[') == item.find(']') - 1: + continue + + # process the case [text()]() + offset = item.find('](') + if offset == -1: + continue + item = item[offset:] start = item.find('(') end = item.find(')') ref = item[start + 1:end]