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

Diego Astiazarán via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 6 13:57:50 PDT 2019


DiegoAstiazaran created this revision.
DiegoAstiazaran added a reviewer: juliehockett.
DiegoAstiazaran added a project: clang-tools-extra.
juliehockett accepted this revision.
juliehockett added a comment.
This revision is now accepted and ready to land.

LGTM (let's make sure we double check this next time)


HTML requires posix-style paths.


https://reviews.llvm.org/D65827

Files:
  clang-tools-extra/clang-doc/HTMLGenerator.cpp


Index: clang-tools-extra/clang-doc/HTMLGenerator.cpp
===================================================================
--- clang-tools-extra/clang-doc/HTMLGenerator.cpp
+++ clang-tools-extra/clang-doc/HTMLGenerator.cpp
@@ -256,6 +256,8 @@
     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));
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65827.213710.patch
Type: text/x-patch
Size: 691 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190806/21f9ceff/attachment.bin>


More information about the cfe-commits mailing list