https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/132103
>From 9293b4ce688b5e420e31e6b442be2f41233d2e1d Mon Sep 17 00:00:00 2001 From: Paul Kirth <paulki...@google.com> Date: Wed, 19 Mar 2025 21:07:22 +0000 Subject: [PATCH] [clang-doc] Correct improper file paths in HTML output In index.js the logic of the ternary operator was backwards, preventing us from generating the correct file paths, or relative paths in the HTML output. --- clang-tools-extra/clang-doc/assets/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang-tools-extra/clang-doc/assets/index.js b/clang-tools-extra/clang-doc/assets/index.js index 6a223de66f84a..58a92f049f19f 100644 --- a/clang-tools-extra/clang-doc/assets/index.js +++ b/clang-tools-extra/clang-doc/assets/index.js @@ -2,8 +2,8 @@ function genLink(Ref) { // we treat the file paths different depending on if we're // serving via a http server or viewing from a local var Path = window.location.protocol.startsWith("file") ? - `${window.location.protocol}//${window.location.host}/${Ref.Path}` : - `${window.location.protocol}//${RootPath}/${Ref.Path}`; + `${window.location.protocol}//${RootPath}/${Ref.Path}` : + `${window.location.protocol}//${window.location.host}/${Ref.Path}`; if (Ref.RefType === "namespace") { Path = `${Path}/index.html` } else if (Ref.Path === "") { _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits