[clang-tools-extra] [clang-doc] switched from using relative to absolute paths (PR #93281)
Paul Kirth via cfe-commits
cfe-commits at lists.llvm.org
Sat Jun 29 09:48:49 PDT 2024
================
@@ -979,6 +980,17 @@ static llvm::Error serializeIndex(ClangDocContext &CDCtx) {
"error creating index file: " +
FileErr.message());
}
+ llvm::SmallString<128> RootPath(CDCtx.OutDirectory);
+ if (llvm::sys::path::is_relative(RootPath)) {
+ llvm::sys::fs::make_absolute(RootPath);
+ }
+ // replace escape character with forward slash it shouldn't matter
+ // when viewing from the browser this helps with preventing javascript
+ // from escaping unwanted characters leading to bad paths
----------------
ilovepi wrote:
Can you use sentences and punctuation here?
Maybe something along these lines?
```suggestion
// Replace the escaped characters with a forward slash. It shouldn't matter
// when rendering the webpage in a web browser. This helps to prevent the
// JavaScript from escaping characters incorrectly, and introducing bad paths
// in the URLs.
```
https://github.com/llvm/llvm-project/pull/93281
More information about the cfe-commits
mailing list