Skip to content

Commit f50f1a7

Browse files
committed
[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.
1 parent c857982 commit f50f1a7

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

+2-2
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)