[clang-tools-extra] r368087 - [clang-doc] Fix paths of js in import tags
Diego Astiazaran via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 6 13:59:15 PDT 2019
Author: diegoastiazaran
Date: Tue Aug 6 13:59:14 2019
New Revision: 368087
URL: http://llvm.org/viewvc/llvm-project?rev=368087&view=rev
Log:
[clang-doc] Fix paths of js in import tags
HTML requires posix-style paths.
Differential Revision: https://reviews.llvm.org/D65827
Modified:
clang-tools-extra/trunk/clang-doc/HTMLGenerator.cpp
Modified: clang-tools-extra/trunk/clang-doc/HTMLGenerator.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-doc/HTMLGenerator.cpp?rev=368087&r1=368086&r2=368087&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-doc/HTMLGenerator.cpp (original)
+++ clang-tools-extra/trunk/clang-doc/HTMLGenerator.cpp Tue Aug 6 13:59:14 2019
@@ -256,6 +256,8 @@ genJsScriptsHTML(StringRef InfoPath, con
auto ScriptNode = llvm::make_unique<TagNode>(HTMLTag::TAG_SCRIPT);
SmallString<128> ScriptPath = computeRelativePath("", InfoPath);
llvm::sys::path::append(ScriptPath, llvm::sys::path::filename(FilePath));
+ // Paths in HTML must be in posix-style
+ llvm::sys::path::native(ScriptPath, llvm::sys::path::Style::posix);
ScriptNode->Attributes.try_emplace("src", ScriptPath);
Out.emplace_back(std::move(ScriptNode));
}
More information about the cfe-commits
mailing list