[clang-doc] Fix paths of js in import tags

HTML requires posix-style paths.

Differential Revision: https://reviews.llvm.org/D65827

llvm-svn: 368087
This commit is contained in:
Diego Astiazaran 2019-08-06 20:59:14 +00:00
parent e1f4c4aad2
commit 40fde90193
1 changed files with 2 additions and 0 deletions

View File

@ -256,6 +256,8 @@ genJsScriptsHTML(StringRef InfoPath, const ClangDocContext &CDCtx) {
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));
}