Skip to content

Commit 3fbc9b9

Browse files
authored
[clang-doc] Correct improper file paths in HTML output (#132103)
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.
1 parent 3923a6b commit 3fbc9b9

File tree

1 file changed

+2
-2
lines changed
  • clang-tools-extra/clang-doc/assets

1 file changed

+2
-2
lines changed

clang-tools-extra/clang-doc/assets/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ function genLink(Ref) {
22
// we treat the file paths different depending on if we're
33
// serving via a http server or viewing from a local
44
var Path = window.location.protocol.startsWith("file") ?
5-
`${window.location.protocol}//${window.location.host}/${Ref.Path}` :
6-
`${window.location.protocol}//${RootPath}/${Ref.Path}`;
5+
`${window.location.protocol}//${RootPath}/${Ref.Path}` :
6+
`${window.location.protocol}//${window.location.host}/${Ref.Path}`;
77
if (Ref.RefType === "namespace") {
88
Path = `${Path}/index.html`
99
} else if (Ref.Path === "") {

0 commit comments

Comments
 (0)