Skip to content

Commit 4e6e429

Browse files
committed
[clang-doc] fix CSS, JS paths for HTML Mustache generation
Resource creation not using the correct path after the patch that placed HTML files into their own directory.
1 parent bb58464 commit 4e6e429

File tree

3 files changed

+3
-91
lines changed

3 files changed

+3
-91
lines changed

clang-tools-extra/clang-doc/HTMLMustacheGenerator.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,11 +274,12 @@ Error MustacheHTMLGenerator::generateDocForInfo(Info *I, raw_ostream &OS,
274274
}
275275

276276
Error MustacheHTMLGenerator::createResources(ClangDocContext &CDCtx) {
277+
std::string ResourcePath(CDCtx.OutDirectory + "/html");
277278
for (const auto &FilePath : CDCtx.UserStylesheets)
278-
if (Error Err = copyFile(FilePath, CDCtx.OutDirectory))
279+
if (Error Err = copyFile(FilePath, ResourcePath))
279280
return Err;
280281
for (const auto &FilePath : CDCtx.JsScripts)
281-
if (Error Err = copyFile(FilePath, CDCtx.OutDirectory))
282+
if (Error Err = copyFile(FilePath, ResourcePath))
282283
return Err;
283284
return Error::success();
284285
}

clang-tools-extra/unittests/clang-doc/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ add_extra_unittest(ClangDocTests
2626
ClangDocTest.cpp
2727
GeneratorTest.cpp
2828
HTMLGeneratorTest.cpp
29-
HTMLMustacheGeneratorTest.cpp
3029
MDGeneratorTest.cpp
3130
MergeTest.cpp
3231
SerializeTest.cpp

clang-tools-extra/unittests/clang-doc/HTMLMustacheGeneratorTest.cpp

Lines changed: 0 additions & 88 deletions
This file was deleted.

0 commit comments

Comments
 (0)