================
@@ -547,20 +562,15 @@ def format_link_alias(doc_file: Tuple[str, str]) -> str:
return ""
module = doc_file[0]
- check_file = doc_file[1].replace(".rst", "")
+ check_file = os.path.splitext(doc_file[1])[0]
if is_clang_analyzer:
title = f"Clang Static Analyzer {check_file}"
# Clang Static Analyzer aliases still need the external redirect
# target so list.rst can link to the upstream analyzer docs.
with open(os.path.join(docs_dir, *doc_file), "r", encoding="utf8")
as doc:
content = doc.read()
- redirect = re.search(
- r".*:http-equiv=refresh: \d+;URL=(.*).html(.*)", content
- )
- # Preserve the anchor in checkers.html from group 2.
- target = (
- "" if not redirect else
f"{redirect.group(1)}.html{redirect.group(2)}"
- )
+ redirect = re.search(r"http-equiv=refresh.*?URL=([^\"'\s]+)",
content)
+ target = "" if not redirect else redirect.group(1)
----------------
vbvictor wrote:
Can we still leave the comment as is?
`# Preserve the anchor in checkers.html from group 2.`
or you think it's useless
https://github.com/llvm/llvm-project/pull/210574
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits