-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[clang-doc] Correct improper file paths in HTML output #132103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Mar 19, 2025
@llvm/pr-subscribers-clang-tools-extra Author: Paul Kirth (ilovepi) ChangesIn index.js the logic of the ternary operator was backwards, preventing Full diff: https://github.com/llvm/llvm-project/pull/132103.diff 1 Files Affected:
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 === "") {
|
petrhosek
approved these changes
Mar 19, 2025
dfc4eae
to
3f09b51
Compare
6182de9
to
4fba6cf
Compare
3f09b51
to
86c3dc2
Compare
4fba6cf
to
96898ef
Compare
86c3dc2
to
df32792
Compare
9293b4c
to
8b73051
Compare
9f1a589
to
c857982
Compare
8b73051
to
f50f1a7
Compare
c857982
to
b00e1c8
Compare
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.
f50f1a7
to
a215322
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.